ld fails to handle empty group sections
Alan Modra
amodra@gmail.com
Sat Jul 8 03:22:00 GMT 2017
Hi Pierre,
Please ask questions like this on the mailing list. Someone wrote
quite a good list of reasons why you should do this. See:
https://www.eyrie.org/~eagle/faqs/questions.html
On Fri, Jul 07, 2017 at 10:44:14AM +0200, Pierre Lebleu wrote:
> With the "trunk" version, I got this message :
[snip]
> staging_dir/toolchain-mips_mips32_gcc-5.3.0_uClibc-0.9.33.2/bin/mips-openwrt-linux-uclibc-ld:
> /usr/localdisk/vant-f_5.02/openwrt/build_dir/target-mips_mips32_uClibc-0.9.33.2/linux-brcm63xx-tch_VANTF/paragon-9.4.4/ifslinux/ufsd.o:
> SHT_GROUP section [index 110] has no SHF_GROUP sections
[snip]
> The problem seems to be those *empty* GROUP sections :
> COMDAT group section [ 110] `.group'
> [wm4.prealloc.h.7.3f44507fe709a4206e0a16687993bc55] contains 0 sections:
> [Index] Name
Right. How is the ufsd.o file being generated? Strictly speaking, I
don't think there is anything in the ELF gABI that precludes an emtpy
group, but such a construct is useless. Rather than modifying the
linker to deal with them, I'd rather they weren't created in the first
place. If the problem is some objcopy or ld -r linking stage that
removes sections, then it is probably better to remove empty groups at
that point rather than trying to deal with them later.
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list