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 11:48:38 +0800
kbuild test robot <fengguang.wu@xxxxxxxxx> wrote:

> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git thin-ar
> head:   f9aac183deb53716ea92f528595758e3c9ef3539
> commit: c5784ad98b773d08562a34b700e9c5e84763c0d8 [5/8] ia64: thin archives fix linking
> config: ia64-allnoconfig (attached as .config)
> compiler: ia64-linux-gcc (GCC) 6.2.0
> reproduce:
>         wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         git checkout c5784ad98b773d08562a34b700e9c5e84763c0d8
>         # save the attached .config to linux build tree
>         make.cross ARCH=ia64 
> 
> All warnings (new ones prefixed by >>):
> 
> >> 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

However it links successfully if I do this:

$ ia64-linux/bin/ia64-linux-ld -r -R arch/ia64/kernel/gate-syms.o -o syms.o
$ ia64-linux/bin/ia64-linux-ld -static 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

I.e., create an intermediate object file with the symbols first using
symbols from gate-syms.o, and use that in the final link rather than -R

Alan do you have any idea what the problem might be here?

If it turns out to be a toolchain bug or limitation, I can do the same
workaround in the kernel.

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