summaryrefslogtreecommitdiff
path: root/gold/target-reloc.h
diff options
context:
space:
mode:
authorDoug Kwan <dougkwan@google.com>2011-11-10 00:41:52 +0000
committerDoug Kwan <dougkwan@google.com>2011-11-10 00:41:52 +0000
commitb353d626153c9b8eef108a844be5846924a4e2bc (patch)
treec3e3c34dc2c43cb74b515dff2841ce4d3a6de01a /gold/target-reloc.h
parente0e67cec24c0b27fa22da398759acdebc3f985c4 (diff)
downloadbinutils-redhat-b353d626153c9b8eef108a844be5846924a4e2bc.tar.gz
2011-11-09 Doug Kwan <dougkwan@google.com>
PR gold/13362 * arm.cc (Arm_scan_relocatable_relocs::Default_scan_relocatable_relocs): Use unaligned 4-byte relocs for static 32-bit data as required by EABI. * reloc.h (Relocatable_relocs::Reloc_strategy): New enum RELOC_ADJUST_FOR_SECTION_4_UNALIGNED. (Relocate_functions::rel_unaligned): New. (Relocate_functions::rel32_unaligned): New. * target-reloc.h (relocate_for_relocatable): Add code to handle RELOC_ADJUST_FOR_SECTION_4_UNALIGNED. * testsuite/Makefile.am (arm_unaligned_reloc_r.stdout, arm_unaligned_reloc_r): New targets. * testsuite/Makefile.in: Regenerate. * arm_unaligned_reloc.sh: Check unaligned relocs in relocatable linking.
Diffstat (limited to 'gold/target-reloc.h')
-rw-r--r--gold/target-reloc.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gold/target-reloc.h b/gold/target-reloc.h
index 832c5d6db7..464a3fa896 100644
--- a/gold/target-reloc.h
+++ b/gold/target-reloc.h
@@ -669,6 +669,7 @@ relocate_for_relocatable(
case Relocatable_relocs::RELOC_ADJUST_FOR_SECTION_2:
case Relocatable_relocs::RELOC_ADJUST_FOR_SECTION_4:
case Relocatable_relocs::RELOC_ADJUST_FOR_SECTION_8:
+ case Relocatable_relocs::RELOC_ADJUST_FOR_SECTION_4_UNALIGNED:
{
// We are adjusting a section symbol. We need to find
// the symbol table index of the section symbol for
@@ -790,6 +791,12 @@ relocate_for_relocatable(
psymval);
break;
+ case Relocatable_relocs::RELOC_ADJUST_FOR_SECTION_4_UNALIGNED:
+ Relocate_functions<size, big_endian>::rel32_unaligned(padd,
+ object,
+ psymval);
+ break;
+
default:
gold_unreachable();
}