This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH][gold] Handle ARM-specific --target1-abs, --target1-rel and --target2 options.
- From: Cary Coutant <ccoutant at gmail dot com>
- To: Doug Kwan <dougkwan at google dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>, Igor Kudrin <ikudrin at accesssoftek dot com>
- Date: Tue, 23 Aug 2016 15:08:45 -0700
- Subject: Re: [PATCH][gold] Handle ARM-specific --target1-abs, --target1-rel and --target2 options.
- Authentication-results: sourceware.org; auth=none
- References: <email@example.com>
What happened to that old patch (this dates to November 2009)? Ian
approved it, but you apparently never committed it. Why not?
Are you OK with the patch here?
On Thu, Jun 30, 2016 at 10:17 AM, Igor Kudrin <firstname.lastname@example.org> wrote:
> This patch implements --target1-abs, --target2-rel and --target2
> options, which are used to set desired relocation types for
> R_ARM_TARGET1 and R_ARM_TARGET2. Pre-existing defaults, which were
> R_ARM_ABS32 for R_ARM_TARGET1 and R_ARM_GOT_PREL for R_ARM_TARGET2,
> are preserved, so the linker's behavior is not changed if these
> options are not used.
> This patch is based on the old patch by Doug Kwan, see
> The tests are based on the corresponding tests from ld.
> Best regards,
> Igor Kudrin
> * arm.cc (Target_arm::Target_arm): Handle --target1-rel,
> --target1-abs and --target2= options.
> (Target_arm::get_reloc_reloc_type): Remove static, add const.
> (Target_arm::target1_reloc_, Target_arm::target2_reloc_): New
> data members.
> (Target_arm::Scan::local): Adjust call to get_real_reloc_type.
> (Target_arm::Scan::global): Likewise.
> (Target_arm::Relocate::relocate): Likewise.
> (Target_arm::Classify_reloc::get_size_for_reloc): Likewise.
> (Target_arm::get_real_reloc_type): Use the new data members
> to return real types of R_ARM_TARGET1 and R_ARM_TARGET2.
> * options.h (--target1-rel, --target1-abs, --target2): New ARM-only
> * testsuite/Makefile.am (arm_target1_abs, arm_target1_rel,
> (arm_target2_abs, arm_target2_got_rel, arm_target2_rel): New tests.
> * testsuite/Makefile.in: Regenerate.
> * testsuite/arm_target1.s: New test source file.
> * testsuite/arm_target2.s: Likewise.
> * testsuite/arm_target1_abs.sh: New test script.
> * testsuite/arm_target1_rel.sh: Likewise.
> * testsuite/arm_target2_abs.sh: Likewise.
> * testsuite/arm_target2_got_rel.sh: Likewise.
> * testsuite/arm_target2_rel.sh: Likewise.