diff options
author | David Carlton <carlton@bactrian.org> | 2003-03-06 00:56:43 +0000 |
---|---|---|
committer | David Carlton <carlton@bactrian.org> | 2003-03-06 00:56:43 +0000 |
commit | ea00b6ec6bf5ed83e0c0310feaa6c6559ee7e84a (patch) | |
tree | 6f941d2e6c4a8d032dcc1f9d7a3684171bd716c9 /bfd/elf32-mips.c | |
parent | 07297283f46fcad05679b32b8109625b0c7d8670 (diff) | |
download | gdb-ea00b6ec6bf5ed83e0c0310feaa6c6559ee7e84a.zip gdb-ea00b6ec6bf5ed83e0c0310feaa6c6559ee7e84a.tar.gz gdb-ea00b6ec6bf5ed83e0c0310feaa6c6559ee7e84a.tar.bz2 |
2003-03-05 David Carlton <carlton@math.stanford.edu>
* Merge with mainline. Tag is carlton_dictionary-20030305-merge.
Diffstat (limited to 'bfd/elf32-mips.c')
-rw-r--r-- | bfd/elf32-mips.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c index 1399f00..cf705d5 100644 --- a/bfd/elf32-mips.c +++ b/bfd/elf32-mips.c @@ -261,9 +261,11 @@ static reloc_howto_type elf_mips_howto_table_rel[] = 0x0000ffff, /* dst_mask */ FALSE), /* pcrel_offset */ - /* 16 bit PC relative reference. */ + /* 16 bit PC relative reference. Note that the ABI document has a typo + and claims R_MIPS_PC16 to be not rightshifted, rendering it useless. + We do the right thing here. */ HOWTO (R_MIPS_PC16, /* type */ - 0, /* rightshift */ + 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ TRUE, /* pc_relative */ @@ -1401,7 +1403,7 @@ static const struct elf_reloc_map mips_reloc_map[] = { BFD_RELOC_GPREL16, R_MIPS_GPREL16 }, { BFD_RELOC_MIPS_LITERAL, R_MIPS_LITERAL }, { BFD_RELOC_MIPS_GOT16, R_MIPS_GOT16 }, - { BFD_RELOC_16_PCREL, R_MIPS_PC16 }, + { BFD_RELOC_16_PCREL_S2, R_MIPS_PC16 }, { BFD_RELOC_MIPS_CALL16, R_MIPS_CALL16 }, { BFD_RELOC_GPREL32, R_MIPS_GPREL32 }, { BFD_RELOC_MIPS_GOT_HI16, R_MIPS_GOT_HI16 }, @@ -1458,7 +1460,7 @@ bfd_elf32_bfd_reloc_type_lookup (abfd, code) return &elf_mips_gnu_rel_hi16; case BFD_RELOC_PCREL_LO16: return &elf_mips_gnu_rel_lo16; - case BFD_RELOC_16_PCREL_S2: + case BFD_RELOC_MIPSEMB_16_PCREL_S2: return &elf_mips_gnu_rel16_s2; case BFD_RELOC_64_PCREL: return &elf_mips_gnu_pcrel64; |