[gold] "entry in mergeable string section not null terminated"
Wed Mar 18 21:47:00 GMT 2009
> /usr/lib/gcc/i586-suse-linux/4.3/../../../../i586-suse-linux/bin/ld: error: /home/peter/g/trunk/host/source/src/ApplicationComponents/AnatomicProgram/libApplicationComponents_AnatomicProgram-debug.a(APr.o): entry in mergeable string section not null terminated
> [... a lot more of those errors in other object files]
> This is with gold as /usr/bin/ld. If I use regualar ld, the link proceeds as intented.
> What is it supposed to tell me?
Certain sections in your relocatable object files contain read-only
string data; the linker tries to optimize the size of your executable
by merging these sections together and eliminating any duplicate
strings. For that to work, each section marked as a mergeable string
section (one with the flags SHF_MERGE and SHF_STRINGS set) must
consist entirely of null-terminated strings, one after the other, so
that the linker can find each individual string.
This error message is telling you that it found a section marked with
SHF_MERGE and SHF_STRINGS, but that the section didn't end with a
null. If you can gzip your archive
libApplicationComponents_AnatomicProgram-debug.a and send it to me,
I'll take a look and see if I can spot the problem. I'm not sure if
the gnu linker is more tolerant, or if it just wasn't trying to do the
constant merging optimization.
More information about the Binutils