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, 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 https://sourceware.org/ml/binutils/2009-11/msg00281.html. The tests are based on the corresponding tests from ld. Best regards, Igor Kudrin --- gold/ChangeLog * 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 options. * 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.
Attachment:
gold-arm-target-opts.patch.txt
Description: gold-arm-target-opts.patch.txt
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |