aboutsummaryrefslogtreecommitdiff
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
parent*** empty log message *** (diff)
downloadbinutils-gdb-2c339f710d5c9dfa791386e1982c20cb09a334ad.tar.gz
binutils-gdb-2c339f710d5c9dfa791386e1982c20cb09a334ad.tar.bz2
binutils-gdb-2c339f710d5c9dfa791386e1982c20cb09a334ad.zip
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 832c5d6db7d..464a3fa896c 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();
}