aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@acm.org>2007-02-05 17:18:39 +0000
committerBob Wilson <bob.wilson@acm.org>2007-02-05 17:18:39 +0000
commite5f131d1dc43f6f998d0b9375e2589b7e0a683fe (patch)
tree6db47e14b94594ac22e49a71e7daa62f19f20e44
parent6a089cf2be6186f34b44369e18dcc68c8ef49da3 (diff)
downloadgdb-e5f131d1dc43f6f998d0b9375e2589b7e0a683fe.zip
gdb-e5f131d1dc43f6f998d0b9375e2589b7e0a683fe.tar.gz
gdb-e5f131d1dc43f6f998d0b9375e2589b7e0a683fe.tar.bz2
* elf32-xtensa.c (elf_howto_table) <R_XTENSA_GLOB_DAT>
<R_XTENSA_JMP_SLOT, R_XTENSA_RELATIVE, R_XTENSA_PLT, R_XTENSA_DIFF32>: Set src_mask to zero. <R_XTENSA_DIFF8, R_XTENSA_DIFF16>: Likewise. Also fix dst_mask. <R_XTENSA_ASM_EXPAND>: Set pcrel_offset to TRUE.
-rw-r--r--bfd/ChangeLog8
-rw-r--r--bfd/elf32-xtensa.c139
2 files changed, 62 insertions, 85 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 7f47fb5..45aa9bd 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,11 @@
+2007-02-05 Bob Wilson <bob.wilson@acm.org>
+
+ * elf32-xtensa.c (elf_howto_table) <R_XTENSA_GLOB_DAT>
+ <R_XTENSA_JMP_SLOT, R_XTENSA_RELATIVE, R_XTENSA_PLT, R_XTENSA_DIFF32>:
+ Set src_mask to zero.
+ <R_XTENSA_DIFF8, R_XTENSA_DIFF16>: Likewise. Also fix dst_mask.
+ <R_XTENSA_ASM_EXPAND>: Set pcrel_offset to TRUE.
+
2007-02-02 Bob Wilson <bob.wilson@acm.org>
* elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Renamed to...
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
index 84b8443..11a99ba 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -156,163 +156,132 @@ static reloc_howto_type elf_howto_table[] =
{
HOWTO (R_XTENSA_NONE, 0, 0, 0, FALSE, 0, complain_overflow_dont,
bfd_elf_xtensa_reloc, "R_XTENSA_NONE",
- FALSE, 0x00000000, 0x00000000, FALSE),
+ FALSE, 0, 0, FALSE),
HOWTO (R_XTENSA_32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
bfd_elf_xtensa_reloc, "R_XTENSA_32",
TRUE, 0xffffffff, 0xffffffff, FALSE),
+
/* Replace a 32-bit value with a value from the runtime linker (only
used by linker-generated stub functions). The r_addend value is
special: 1 means to substitute a pointer to the runtime linker's
dynamic resolver function; 2 means to substitute the link map for
the shared object. */
HOWTO (R_XTENSA_RTLD, 0, 2, 32, FALSE, 0, complain_overflow_dont,
- NULL, "R_XTENSA_RTLD",
- FALSE, 0x00000000, 0x00000000, FALSE),
+ NULL, "R_XTENSA_RTLD", FALSE, 0, 0, FALSE),
+
HOWTO (R_XTENSA_GLOB_DAT, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
bfd_elf_generic_reloc, "R_XTENSA_GLOB_DAT",
- FALSE, 0xffffffff, 0xffffffff, FALSE),
+ FALSE, 0, 0xffffffff, FALSE),
HOWTO (R_XTENSA_JMP_SLOT, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
bfd_elf_generic_reloc, "R_XTENSA_JMP_SLOT",
- FALSE, 0xffffffff, 0xffffffff, FALSE),
+ FALSE, 0, 0xffffffff, FALSE),
HOWTO (R_XTENSA_RELATIVE, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
bfd_elf_generic_reloc, "R_XTENSA_RELATIVE",
- FALSE, 0xffffffff, 0xffffffff, FALSE),
+ FALSE, 0, 0xffffffff, FALSE),
HOWTO (R_XTENSA_PLT, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
bfd_elf_xtensa_reloc, "R_XTENSA_PLT",
- FALSE, 0xffffffff, 0xffffffff, FALSE),
+ FALSE, 0, 0xffffffff, FALSE),
+
EMPTY_HOWTO (7),
+
+ /* Old relocations for backward compatibility. */
HOWTO (R_XTENSA_OP0, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_OP0",
- FALSE, 0x00000000, 0x00000000, TRUE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_OP0", FALSE, 0, 0, TRUE),
HOWTO (R_XTENSA_OP1, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_OP1",
- FALSE, 0x00000000, 0x00000000, TRUE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_OP1", FALSE, 0, 0, TRUE),
HOWTO (R_XTENSA_OP2, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_OP2",
- FALSE, 0x00000000, 0x00000000, TRUE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_OP2", FALSE, 0, 0, TRUE),
+
/* Assembly auto-expansion. */
HOWTO (R_XTENSA_ASM_EXPAND, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_ASM_EXPAND",
- FALSE, 0x00000000, 0x00000000, FALSE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_ASM_EXPAND", FALSE, 0, 0, TRUE),
/* Relax assembly auto-expansion. */
HOWTO (R_XTENSA_ASM_SIMPLIFY, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_ASM_SIMPLIFY",
- FALSE, 0x00000000, 0x00000000, TRUE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_ASM_SIMPLIFY", FALSE, 0, 0, TRUE),
+
EMPTY_HOWTO (13),
EMPTY_HOWTO (14),
+
/* GNU extension to record C++ vtable hierarchy. */
HOWTO (R_XTENSA_GNU_VTINHERIT, 0, 2, 0, FALSE, 0, complain_overflow_dont,
NULL, "R_XTENSA_GNU_VTINHERIT",
- FALSE, 0x00000000, 0x00000000, FALSE),
+ FALSE, 0, 0, FALSE),
/* GNU extension to record C++ vtable member usage. */
HOWTO (R_XTENSA_GNU_VTENTRY, 0, 2, 0, FALSE, 0, complain_overflow_dont,
_bfd_elf_rel_vtable_reloc_fn, "R_XTENSA_GNU_VTENTRY",
- FALSE, 0x00000000, 0x00000000, FALSE),
+ FALSE, 0, 0, FALSE),
/* Relocations for supporting difference of symbols. */
HOWTO (R_XTENSA_DIFF8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield,
- bfd_elf_xtensa_reloc, "R_XTENSA_DIFF8",
- FALSE, 0xffffffff, 0xffffffff, FALSE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_DIFF8", FALSE, 0, 0xff, FALSE),
HOWTO (R_XTENSA_DIFF16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,
- bfd_elf_xtensa_reloc, "R_XTENSA_DIFF16",
- FALSE, 0xffffffff, 0xffffffff, FALSE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_DIFF16", FALSE, 0, 0xffff, FALSE),
HOWTO (R_XTENSA_DIFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
- bfd_elf_xtensa_reloc, "R_XTENSA_DIFF32",
- FALSE, 0xffffffff, 0xffffffff, FALSE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_DIFF32", FALSE, 0, 0xffffffff, FALSE),
/* General immediate operand relocations. */
HOWTO (R_XTENSA_SLOT0_OP, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_SLOT0_OP",
- FALSE, 0x00000000, 0x00000000, TRUE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_SLOT0_OP", FALSE, 0, 0, TRUE),
HOWTO (R_XTENSA_SLOT1_OP, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_SLOT1_OP",
- FALSE, 0x00000000, 0x00000000, TRUE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_SLOT1_OP", FALSE, 0, 0, TRUE),
HOWTO (R_XTENSA_SLOT2_OP, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_SLOT2_OP",
- FALSE, 0x00000000, 0x00000000, TRUE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_SLOT2_OP", FALSE, 0, 0, TRUE),
HOWTO (R_XTENSA_SLOT3_OP, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_SLOT3_OP",
- FALSE, 0x00000000, 0x00000000, TRUE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_SLOT3_OP", FALSE, 0, 0, TRUE),
HOWTO (R_XTENSA_SLOT4_OP, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_SLOT4_OP",
- FALSE, 0x00000000, 0x00000000, TRUE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_SLOT4_OP", FALSE, 0, 0, TRUE),
HOWTO (R_XTENSA_SLOT5_OP, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_SLOT5_OP",
- FALSE, 0x00000000, 0x00000000, TRUE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_SLOT5_OP", FALSE, 0, 0, TRUE),
HOWTO (R_XTENSA_SLOT6_OP, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_SLOT6_OP",
- FALSE, 0x00000000, 0x00000000, TRUE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_SLOT6_OP", FALSE, 0, 0, TRUE),
HOWTO (R_XTENSA_SLOT7_OP, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_SLOT7_OP",
- FALSE, 0x00000000, 0x00000000, TRUE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_SLOT7_OP", FALSE, 0, 0, TRUE),
HOWTO (R_XTENSA_SLOT8_OP, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_SLOT8_OP",
- FALSE, 0x00000000, 0x00000000, TRUE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_SLOT8_OP", FALSE, 0, 0, TRUE),
HOWTO (R_XTENSA_SLOT9_OP, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_SLOT9_OP",
- FALSE, 0x00000000, 0x00000000, TRUE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_SLOT9_OP", FALSE, 0, 0, TRUE),
HOWTO (R_XTENSA_SLOT10_OP, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_SLOT10_OP",
- FALSE, 0x00000000, 0x00000000, TRUE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_SLOT10_OP", FALSE, 0, 0, TRUE),
HOWTO (R_XTENSA_SLOT11_OP, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_SLOT11_OP",
- FALSE, 0x00000000, 0x00000000, TRUE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_SLOT11_OP", FALSE, 0, 0, TRUE),
HOWTO (R_XTENSA_SLOT12_OP, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_SLOT12_OP",
- FALSE, 0x00000000, 0x00000000, TRUE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_SLOT12_OP", FALSE, 0, 0, TRUE),
HOWTO (R_XTENSA_SLOT13_OP, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_SLOT13_OP",
- FALSE, 0x00000000, 0x00000000, TRUE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_SLOT13_OP", FALSE, 0, 0, TRUE),
HOWTO (R_XTENSA_SLOT14_OP, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_SLOT14_OP",
- FALSE, 0x00000000, 0x00000000, TRUE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_SLOT14_OP", FALSE, 0, 0, TRUE),
/* "Alternate" relocations. The meaning of these is opcode-specific. */
HOWTO (R_XTENSA_SLOT0_ALT, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_SLOT0_ALT",
- FALSE, 0x00000000, 0x00000000, TRUE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_SLOT0_ALT", FALSE, 0, 0, TRUE),
HOWTO (R_XTENSA_SLOT1_ALT, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_SLOT1_ALT",
- FALSE, 0x00000000, 0x00000000, TRUE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_SLOT1_ALT", FALSE, 0, 0, TRUE),
HOWTO (R_XTENSA_SLOT2_ALT, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_SLOT2_ALT",
- FALSE, 0x00000000, 0x00000000, TRUE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_SLOT2_ALT", FALSE, 0, 0, TRUE),
HOWTO (R_XTENSA_SLOT3_ALT, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_SLOT3_ALT",
- FALSE, 0x00000000, 0x00000000, TRUE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_SLOT3_ALT", FALSE, 0, 0, TRUE),
HOWTO (R_XTENSA_SLOT4_ALT, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_SLOT4_ALT",
- FALSE, 0x00000000, 0x00000000, TRUE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_SLOT4_ALT", FALSE, 0, 0, TRUE),
HOWTO (R_XTENSA_SLOT5_ALT, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_SLOT5_ALT",
- FALSE, 0x00000000, 0x00000000, TRUE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_SLOT5_ALT", FALSE, 0, 0, TRUE),
HOWTO (R_XTENSA_SLOT6_ALT, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_SLOT6_ALT",
- FALSE, 0x00000000, 0x00000000, TRUE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_SLOT6_ALT", FALSE, 0, 0, TRUE),
HOWTO (R_XTENSA_SLOT7_ALT, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_SLOT7_ALT",
- FALSE, 0x00000000, 0x00000000, TRUE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_SLOT7_ALT", FALSE, 0, 0, TRUE),
HOWTO (R_XTENSA_SLOT8_ALT, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_SLOT8_ALT",
- FALSE, 0x00000000, 0x00000000, TRUE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_SLOT8_ALT", FALSE, 0, 0, TRUE),
HOWTO (R_XTENSA_SLOT9_ALT, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_SLOT9_ALT",
- FALSE, 0x00000000, 0x00000000, TRUE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_SLOT9_ALT", FALSE, 0, 0, TRUE),
HOWTO (R_XTENSA_SLOT10_ALT, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_SLOT10_ALT",
- FALSE, 0x00000000, 0x00000000, TRUE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_SLOT10_ALT", FALSE, 0, 0, TRUE),
HOWTO (R_XTENSA_SLOT11_ALT, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_SLOT11_ALT",
- FALSE, 0x00000000, 0x00000000, TRUE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_SLOT11_ALT", FALSE, 0, 0, TRUE),
HOWTO (R_XTENSA_SLOT12_ALT, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_SLOT12_ALT",
- FALSE, 0x00000000, 0x00000000, TRUE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_SLOT12_ALT", FALSE, 0, 0, TRUE),
HOWTO (R_XTENSA_SLOT13_ALT, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_SLOT13_ALT",
- FALSE, 0x00000000, 0x00000000, TRUE),
+ bfd_elf_xtensa_reloc, "R_XTENSA_SLOT13_ALT", FALSE, 0, 0, TRUE),
HOWTO (R_XTENSA_SLOT14_ALT, 0, 0, 0, TRUE, 0, complain_overflow_dont,
- bfd_elf_xtensa_reloc, "R_XTENSA_SLOT14_ALT",
- FALSE, 0x00000000, 0x00000000, TRUE)
+ bfd_elf_xtensa_reloc, "R_XTENSA_SLOT14_ALT", FALSE, 0, 0, TRUE),
};
#if DEBUG_GEN_RELOC