Re: [kbuild:thin-ar 5/8] ia64-linux-ld: warning: .note.gnu.build-id section discarded, --build-id ignored.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 22 Jun 2017 23:34:01 +0930
Alan Modra <amodra@xxxxxxxxx> wrote:

> On Thu, Jun 22, 2017 at 02:33:27PM +1000, Nicholas Piggin wrote:
> > On Thu, 22 Jun 2017 11:48:38 +0800
> > kbuild test robot <fengguang.wu@xxxxxxxxx> wrote:  
> > > >> ia64-linux-ld: warning: .note.gnu.build-id section discarded, --build-id ignored.    
> > 
> > 
> > Sigh.
> > 
> > What's happening here is that when performing the final link with the
> > -R option, the linker forgets to emit the --build-id section it was
> > asked to.
> > 
> > This is the final link command line that causes the error:
> > 
> > $ ia64-linux-ld -static -R arch/ia64/kernel/gate-syms.o --build-id -o vmlinux -T ./arch/ia64/kernel/vmlinux.lds --whole-archive built-in.o --no-whole-archive --start-group lib/lib.a arch/ia64/lib/lib.a --end-group  
> 
> Try putting the --just-symbols (-R) file after --no-whole-archive.
> The idea being to make it not the first object file.  --just-symbols
> files have their contents discarded, and the linker is stupidly
> attaching the section it creates to hold the build-id, to that file.
> 

That makes sense. It's a bit tricky to do this with the way options are
provided by the arch code to the final link, but I worked around it by
linking a small dummy .o file with the symbols and pulling that into the
final link.

Thanks,
Nick
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux