diff options
author | Nick Clifton <nickc@redhat.com> | 2010-03-18 11:22:46 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2010-03-18 11:22:46 +0000 |
commit | b43420e6cdbc2b1ae000f4671470d208ac7241a9 (patch) | |
tree | 461a0ff104afd4e004535bc1f70ce12c0ed688f1 /gas/config/tc-arm.c | |
parent | 17299ac7f6d12ac5286a490e43c0cdb75abc0f21 (diff) | |
download | gdb-b43420e6cdbc2b1ae000f4671470d208ac7241a9.zip gdb-b43420e6cdbc2b1ae000f4671470d208ac7241a9.tar.gz gdb-b43420e6cdbc2b1ae000f4671470d208ac7241a9.tar.bz2 |
bfd/
2010-03-15 Wei Guozhi <carrot@google.com>
PR gas/11323
* bfd-in2.h (enum bfd_reloc_code_real): New BFD_RELOC_GOT_PREL type.
* elf32-arm.c (elf32_arm_reloc_map): BFD_RELOC_GOT_PREL to
R_ARM_GOT_PREL map.
* libbfd.h (bfd_reloc_code_real_names): BFD_RELOC_GOT_PREL name.
* reloc.c (comments): Document the new relocation.
gas/
2010-03-15 Wei Guozhi <carrot@google.com>
PR gas/11323
* config/tc-arm.c (reloc_names): New relocation names.
(md_apply_fix): New case for BFD_RELOC_ARM_GOT_PREL.
(tc_gen_reloc): New case for BFD_RELOC_ARM_GOT_PREL.
* doc/c-arm.texi (ARM-Relocations): Document the new relocation.
gas/testsuite
2010-03-15 Wei Guozhi <carrot@google.com>
PR gas/11323
* gas/arm/got_prel.s: New test case.
* gas/arm/got_prel.d: Likewise.
Diffstat (limited to 'gas/config/tc-arm.c')
-rw-r--r-- | gas/config/tc-arm.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 16f4fd3..557b9f9 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -1,6 +1,6 @@ /* tc-arm.c -- Assemble for the ARM Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, - 2004, 2005, 2006, 2007, 2008, 2009 + 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org) Modified by David Taylor (dtaylor@armltd.co.uk) @@ -16191,7 +16191,8 @@ static struct reloc_entry reloc_names[] = { "tlsldm", BFD_RELOC_ARM_TLS_LDM32}, { "TLSLDM", BFD_RELOC_ARM_TLS_LDM32}, { "tlsldo", BFD_RELOC_ARM_TLS_LDO32}, { "TLSLDO", BFD_RELOC_ARM_TLS_LDO32}, { "gottpoff",BFD_RELOC_ARM_TLS_IE32}, { "GOTTPOFF",BFD_RELOC_ARM_TLS_IE32}, - { "tpoff", BFD_RELOC_ARM_TLS_LE32}, { "TPOFF", BFD_RELOC_ARM_TLS_LE32} + { "tpoff", BFD_RELOC_ARM_TLS_LE32}, { "TPOFF", BFD_RELOC_ARM_TLS_LE32}, + { "got_prel", BFD_RELOC_ARM_GOT_PREL}, { "GOT_PREL", BFD_RELOC_ARM_GOT_PREL} }; #endif @@ -20477,7 +20478,12 @@ md_apply_fix (fixS * fixP, if (fixP->fx_done || !seg->use_rela_p) md_number_to_chars (buf, 0, 4); break; - + + case BFD_RELOC_ARM_GOT_PREL: + if (fixP->fx_done || !seg->use_rela_p) + md_number_to_chars (buf, value, 4); + break; + case BFD_RELOC_ARM_TARGET2: /* TARGET2 is not partial-inplace, so we need to write the addend here for REL targets, because it won't be written out @@ -21062,6 +21068,7 @@ tc_gen_reloc (asection *section, fixS *fixp) #ifdef OBJ_ELF case BFD_RELOC_ARM_GOT32: case BFD_RELOC_ARM_GOTOFF: + case BFD_RELOC_ARM_GOT_PREL: case BFD_RELOC_ARM_PLT32: case BFD_RELOC_ARM_TARGET1: case BFD_RELOC_ARM_ROSEGREL32: |