This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi, Here is a patch to allow ICF to fold .gnu.linkonce.t sections. * gc.h (gc_process_relocs): Call is_section_foldable_candidate to check for .text or .gnu.linkonce.t sections. * icf.cc (Icf::find_identical_sections): Ditto. Change the detection for mangled function name within the section name. * icf.h (is_section_foldable_candidate): New function. Please let me know what you think. Thanks, -Sri. On Tue, Dec 29, 2009 at 7:14 PM, Ian Lance Taylor <iant@google.com> wrote: > 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 >
Attachment:
gold_icf_patch.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |