icf_safe_test in gold fails with gcc-4.0.3

Ian Lance Taylor iant@google.com
Wed Dec 30 03:15:00 GMT 2009


Sriraman Tallam <tmsriram@google.com> writes:

>    With gcc-4.0.3, icf_safe_test fails.
>
> Safe Identical Code Folding did not fold  _ZN1AD1Ev and _ZN1AC1Ev
> FAIL: icf_safe_test.sh
>
> This is because gcc-4.0.3 puts constructors and destructors in
> .gnu.linkonce.t sections whereas gcc-4.4, on which ICF was tested,
> puts them in .text sections. I can modify ICF to also fold
> .gnu.linkonce.t sections and that should solve the problem. Would this
> be alright ?

Folding .gnu.linkonce sections should be fine.  Don't get confused by
the fact that duplicate .gnu.linkonce sections with the same names are
discarded.  .gnu.linkonce is the old mechanism which is now done using
SHT_GROUP.

Ian



More information about the Binutils mailing list