This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: PR ld/14272: Mark the plugin symbol undefined
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Binutils <binutils at sourceware dot org>
- Date: Sat, 7 Feb 2015 04:37:08 -0800
- Subject: Re: PATCH: PR ld/14272: Mark the plugin symbol undefined
- Authentication-results: sourceware.org; auth=none
- References: <CAMe9rOqVkDWQ3gzojEQzRLmcj=DC+a9GS5HWX2Zy9S7HD9QkBA at mail dot gmail dot com> <20150204110841 dot GN14796 at bubble dot grove dot modra dot org> <CAMe9rOoh3dVaRUSWFb5=V=CEtsL24+s=7DeZiDQ+a7LtEU4q_w at mail dot gmail dot com> <20150206005938 dot GY14796 at bubble dot grove dot modra dot org> <CAMe9rOqd1RzU9hfqYkg+Tbyd0hSLgoWi3ECVBWaX8YAr5iNQ7Q at mail dot gmail dot com> <20150206015245 dot GZ14796 at bubble dot grove dot modra dot org> <CAMe9rOowvONfJkrP2cNA8TvPQWyGAWM72MegATaq6cNcP6MbYQ at mail dot gmail dot com> <CAMe9rOo1Y_imS06Mf1c=BPX4iMi2Ox171J-5dXMOkUgx8vFGow at mail dot gmail dot com> <20150206122321 dot GA3266 at gmail dot com> <20150207022110 dot GC14796 at bubble dot grove dot modra dot org>
On Sat, Feb 07, 2015 at 12:51:10PM +1030, Alan Modra wrote:
> On Fri, Feb 06, 2015 at 04:23:21AM -0800, H.J. Lu wrote:
> > It turns out that existing tests show PR ld/12365. The "plugin claimfile
> > resolve symbol" and "plugin claimfile replace symbol" tests expect
> >
> > `func' referenced in section `.text.startup' of tmpdir/main.o: defined
> > in discarded section `.text' of tmpdir/func.o (symbol from plugin)
> >
> > Since plugin never provides func, the error message should be
> >
> > tmpdir/main.o: In function `main':
> > main.c:(.text.startup+0x15): undefined reference to `func'
>
> I disagree with this. You've made an error message much less
> informative as it now does not even give a clue that some lto plugin
Gold also gave:
gcc -O2 -flto -flto-partition=none -fuse-ld=gold -o x pr12365a.o pr12365c.o pr12365b.o lib.o
/tmp/cc1vqkUy.lto.o:pr12365a.o:function main: error: undefined reference
to 'my_bcopy'
> problem caused the link error.
>
It could be a ld bug or a lto plugin library bug. User has no cluse what
pr12365c.o (symbol from plugin) is, which is a linker internal
implemenation detail and certainly not on the command line.
H.J.