This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [GOLD] Support --icf=safe with -pie for x86_64
- From: Cary Coutant <ccoutant at gmail dot com>
- To: Rahul Chaudhry <rahulchaudhry at google dot com>
- Cc: Alan Modra <amodra at gmail dot com>, Binutils <binutils at sourceware dot org>, Sriraman Tallam <tmsriram at google dot com>
- Date: Wed, 15 Feb 2017 00:39:15 -0800
- Subject: Re: [GOLD] Support --icf=safe with -pie for x86_64
- Authentication-results: sourceware.org; auth=none
- References: <CAJRD=oqcd2y03pjosB6ifygwGv1wO0VgPFFqvTiSOvFhaqisJA@mail.gmail.com> <20170113012324.GO32333@bubble.grove.modra.org> <CAJRD=opJc+d+RENAfdndtyB2mjSHLTgXfhua2KF=R46dtkA-4Q@mail.gmail.com> <CAJimCsE=L3ZqLCxSn=V_HA_+BWL3uwjp5uoPtuQjk1sEXX1bhg@mail.gmail.com> <CAJRD=oq+MyiTzpLjWHTCG5Oz57zjBCmLQUHEptdK3pJNhb0Lyg@mail.gmail.com> <CAJRD=oqwKKQnihHTUZtUr8YJcb3m9MJscy27hZHCstSKoYhqzw@mail.gmail.com>
> * x86_64.cc (Target_x86_64::do_can_check_for_function_pointers):
> Return true even when building pie binaries.
> (Target_x86_64::possible_function_pointer_reloc): Check opcode
> for R_X86_64_PC32 relocations.
> (Target_x86_64::local_reloc_may_be_function_pointer): Pass
> extra arguments to local_reloc_may_be_function_pointer.
> (Target_x86_64::global_reloc_may_be_function_pointer): Likewise.
> * gc.h (gc_process_relocs): Add check for STT_FUNC.
> * testsuite/Makefile.am (icf_safe_pie_test): New test case.
> * testsuite/Makefile.in: Regenerate.
> * testsuite/icf_safe_pie_test.sh: New shell script.
This is OK. I've committed it on your behalf.
Thanks!
-cary