This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR ld/14272: Mark the plugin symbol undefined


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]