aboutsummaryrefslogtreecommitdiff
path: root/gold/target-reloc.h
diff options
context:
space:
mode:
authorDoug Kwan <dougkwan@google.com>2011-11-10 00:41:53 +0000
committerDoug Kwan <dougkwan@google.com>2011-11-10 00:41:53 +0000
commit2c339f710d5c9dfa791386e1982c20cb09a334ad (patch)
tree5d0edca5ee677c244ecbdac42c64f540ea305d90 /gold/target-reloc.h
parenteac29d46b776d0ac11961376f49c207f34eb5ebd (diff)
downloadgdb-2c339f710d5c9dfa791386e1982c20cb09a334ad.zip
gdb-2c339f710d5c9dfa791386e1982c20cb09a334ad.tar.gz
gdb-2c339f710d5c9dfa791386e1982c20cb09a334ad.tar.bz2
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 832c5d6..464a3fa 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();
}