From a8bc6c780e54b1dad7c356c815965f87df0314c7 Mon Sep 17 00:00:00 2001 From: Paul Brook Date: Tue, 2 May 2006 13:09:18 +0000 Subject: 2006-05-02 Paul Brook bfd/ * elf32-arm.c (elf32_arm_final_link_relocate): Set thumb funciton bit for R_ARM_REL32. gas/ * config/tc-arm.c (arm_optimize_expr): New function. * config/tc-arm.h (md_optimize_expr): Define (arm_optimize_expr): Add prototype. (TC_FORCE_RELOCATION_SUB_SAME): Define. ld/testsuite/ * ld-arm/arm-elf.exp: Add thumb-rel32. * ld-arm/thumb-rel32.d: New test. * ld-arm/thumb-rel32.s: New test. --- bfd/ChangeLog | 5 +++++ bfd/elf32-arm.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'bfd') diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 9381660..e3d371f 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2006-05-02 Paul Brook + + * elf32-arm.c (elf32_arm_final_link_relocate): Set thumb funciton bit + for R_ARM_REL32. + 2006-05-02 Ben Elliston * archive.c (bfd_generic_archive_p): Remove unused local variable diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index bd3c4e3..eb7723b 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -3274,9 +3274,11 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, break; case R_ARM_REL32: + value += addend; + if (sym_flags == STT_ARM_TFUNC) + value |= 1; value -= (input_section->output_section->vma + input_section->output_offset + rel->r_offset); - value += addend; break; case R_ARM_PREL31: -- cgit v1.1