solaris section merging linker bug?

Ian Lance Taylor iant@google.com
Thu Jun 25 23:01:00 GMT 2009


Michael Haubenwallner <michael.haubenwallner@salomon.at> writes:

> besides i386-solaris2.10, I'm encountering this linker bug on
> sparc-solaris2.9 too (works on sparc-solaris10 here) with gcc-4.2.4:
> http://mail.opensolaris.org/pipermail/tools-linking/2006-October/000229.html
> The workaround is to compile with '-fmerge-constants' even with '-g'.
>
> Question now is, what happened to this patch, as I can't find it in any
> gcc-4_*-branch or trunk?
> http://gcc.gnu.org/ml/gcc-patches/2006-01/msg00740.html

That patch was not applied because -fno-merge-debug-strings was
implemented instead.

`-fno-merge-debug-strings'
     Direct the linker to merge together strings which are identical in
     different object files.  This is not supported by all assemblers or
     linker.  This decreases the size of the debug information in the
     output file at the cost of increasing link processing time.  This
     is on by default.

That change fixes the problem by making whether a debug section is
mergeable independent of the optimization setting.  It is in gcc 4.3 and
later.

Ian



More information about the Gcc-help mailing list