[gold] "entry in mergeable string section not null terminated"

Joseph S. Myers joseph@codesourcery.com
Fri Mar 20 20:17:00 GMT 2009

On Thu, 19 Mar 2009, Ian Lance Taylor wrote:

> The GNU linker does implement this optimization, and it is more
> tolerant.  When merging a string section, it reads the section into
> memory, and explicitly pads it with a null character.  The code refers
> to a gcc patch
> http://gcc.gnu.org/ml/gcc-patches/2006-06/msg01004.html
> which fixes a case where gcc marked a section as containing mergeable
> strings even though the strings were not null terminated.  This was
> fixed in gcc 4.1.2, so if Peter is using an earlier version of gcc that
> could conceivably be the problem here.

I made it a (normal) error in the GNU linker (in place of the linker 
giving internal errors), then it was changed to a warning because it 
turned out buggy compilers, or libraries or other objects built by them, 
were still widely used.


Joseph S. Myers

More information about the Binutils mailing list