diff options
author | Alan Modra <amodra@gmail.com> | 2002-05-02 12:35:25 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2002-05-02 12:35:25 +0000 |
commit | c061c2d8bbef2866e0ad776f1836278d678dd134 (patch) | |
tree | 621e1cfa1ef8334deb2373ba1420c4f858d276db | |
parent | 6604db2ec02fda3c9b0ec8a117aef7a2fc152678 (diff) | |
download | gdb-c061c2d8bbef2866e0ad776f1836278d678dd134.zip gdb-c061c2d8bbef2866e0ad776f1836278d678dd134.tar.gz gdb-c061c2d8bbef2866e0ad776f1836278d678dd134.tar.bz2 |
* elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
16 bit reloc.
<R_PPC64_SECTOFF_DS>: Likewise.
(ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
SECTOFF reloc.
* elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
(ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
SECTOFF reloc.
-rw-r--r-- | bfd/ChangeLog | 9 | ||||
-rw-r--r-- | bfd/elf32-ppc.c | 14 | ||||
-rw-r--r-- | bfd/elf64-ppc.c | 18 |
3 files changed, 25 insertions, 16 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 3d9b501..f944a8b 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,14 @@ 2002-05-02 Alan Modra <amodra@bigpond.net.au> + * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a + 16 bit reloc. + <R_PPC64_SECTOFF_DS>: Likewise. + (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to + SECTOFF reloc. + * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct. + (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to + SECTOFF reloc. + * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete. (ppc64_elf_ha_reloc): New function. (ppc64_elf_brtaken_reloc): New function. diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index 9549d29..f68d914 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -679,20 +679,20 @@ static reloc_howto_type ppc_elf_howto_raw[] = { 0xffff, /* dst_mask */ false), /* pcrel_offset */ - /* 32-bit section relative relocation. */ + /* 16-bit section relative relocation. */ HOWTO (R_PPC_SECTOFF, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ - true, /* pc_relative */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_PPC_SECTOFF", /* name */ false, /* partial_inplace */ 0, /* src_mask */ - 0, /* dst_mask */ - true), /* pcrel_offset */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ /* 16-bit lower half section relative relocation. */ HOWTO (R_PPC_SECTOFF_LO, /* type */ @@ -1295,7 +1295,7 @@ ppc_elf_reloc_type_lookup (abfd, code) case BFD_RELOC_HI16_PLTOFF: ppc_reloc = R_PPC_PLT16_HI; break; case BFD_RELOC_HI16_S_PLTOFF: ppc_reloc = R_PPC_PLT16_HA; break; case BFD_RELOC_GPREL16: ppc_reloc = R_PPC_SDAREL16; break; - case BFD_RELOC_32_BASEREL: ppc_reloc = R_PPC_SECTOFF; break; + case BFD_RELOC_16_BASEREL: ppc_reloc = R_PPC_SECTOFF; break; case BFD_RELOC_LO16_BASEREL: ppc_reloc = R_PPC_SECTOFF_LO; break; case BFD_RELOC_HI16_BASEREL: ppc_reloc = R_PPC_SECTOFF_HI; break; case BFD_RELOC_HI16_S_BASEREL: ppc_reloc = R_PPC_SECTOFF_HA; break; diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 339d7f9..d00dcf2 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -617,11 +617,11 @@ static reloc_howto_type ppc64_elf_howto_raw[] = { 0xffff, /* dst_mask */ false), /* pcrel_offset */ - /* 32-bit section relative relocation. */ + /* 16-bit section relative relocation. */ HOWTO (R_PPC64_SECTOFF, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ @@ -629,10 +629,10 @@ static reloc_howto_type ppc64_elf_howto_raw[] = { "R_PPC64_SECTOFF", /* name */ false, /* partial_inplace */ 0, /* src_mask */ - 0xffffffff, /* dst_mask */ + 0xffff, /* dst_mask */ false), /* pcrel_offset */ - /* 16-bit lower half section relative relocation. */ + /* Like R_PPC64_SECTOFF, but no overflow warning. */ HOWTO (R_PPC64_SECTOFF_LO, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ @@ -1072,8 +1072,8 @@ static reloc_howto_type ppc64_elf_howto_raw[] = { /* Like R_PPC64_SECTOFF, but for instructions with a DS field. */ HOWTO (R_PPC64_SECTOFF_DS, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ @@ -1081,7 +1081,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = { "R_PPC64_SECTOFF_DS", /* name */ false, /* partial_inplace */ 0, /* src_mask */ - 0xfffffffc, /* dst_mask */ + 0xfffc, /* dst_mask */ false), /* pcrel_offset */ /* Like R_PPC64_SECTOFF_LO, but for instructions with a DS field. */ @@ -1280,7 +1280,7 @@ ppc64_elf_reloc_type_lookup (abfd, code) break; case BFD_RELOC_HI16_S_PLTOFF: ppc_reloc = R_PPC64_PLT16_HA; break; - case BFD_RELOC_32_BASEREL: ppc_reloc = R_PPC64_SECTOFF; + case BFD_RELOC_16_BASEREL: ppc_reloc = R_PPC64_SECTOFF; break; case BFD_RELOC_LO16_BASEREL: ppc_reloc = R_PPC64_SECTOFF_LO; break; |