summaryrefslogtreecommitdiff
path: root/gnu/usr.bin
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2020-07-22 14:04:28 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2020-07-22 14:04:28 +0000
commit42bb00fdba11d62d996fe652dd527e15fa3d0895 (patch)
treeff5b257c89e345d9d5a1647eccc2b58a4e7b7118 /gnu/usr.bin
parentab477f066455e4efc66e306155b5ecb0359874e6 (diff)
Add a few missing elocations.
ok jasper@
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r--gnu/usr.bin/binutils-2.17/bfd/elf64-ppc.c60
-rw-r--r--gnu/usr.bin/binutils-2.17/include/elf/ppc64.h5
2 files changed, 65 insertions, 0 deletions
diff --git a/gnu/usr.bin/binutils-2.17/bfd/elf64-ppc.c b/gnu/usr.bin/binutils-2.17/bfd/elf64-ppc.c
index 8f932305755..c8bd2fc8f5e 100644
--- a/gnu/usr.bin/binutils-2.17/bfd/elf64-ppc.c
+++ b/gnu/usr.bin/binutils-2.17/bfd/elf64-ppc.c
@@ -1833,6 +1833,66 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
0xffff, /* dst_mask */
FALSE), /* pcrel_offset */
+ /* 16-bit PC relative. */
+ HOWTO (R_PPC64_REL16, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC64_REL16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* Like REL16, but no overflow. */
+ HOWTO (R_PPC64_REL16_LO, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC64_REL16_LO", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* Like REL16_LO, but next higher group of 16 bits. */
+ HOWTO (R_PPC64_REL16_HI, /* type */
+ 16, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC64_REL16_HI", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* Like REL16_HI, but adjust for low 16 bits. */
+ HOWTO (R_PPC64_REL16_HA, /* type */
+ 16, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ ppc64_elf_ha_reloc, /* special_function */
+ "R_PPC64_REL16_HA", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
/* GNU extension to record C++ vtable hierarchy. */
HOWTO (R_PPC64_GNU_VTINHERIT, /* type */
0, /* rightshift */
diff --git a/gnu/usr.bin/binutils-2.17/include/elf/ppc64.h b/gnu/usr.bin/binutils-2.17/include/elf/ppc64.h
index 4aab2ec9446..48fe5b527dd 100644
--- a/gnu/usr.bin/binutils-2.17/include/elf/ppc64.h
+++ b/gnu/usr.bin/binutils-2.17/include/elf/ppc64.h
@@ -137,6 +137,11 @@ START_RELOC_NUMBERS (elf_ppc64_reloc_type)
RELOC_NUMBER (R_PPC64_DTPREL16_HIGHEST, 105)
RELOC_NUMBER (R_PPC64_DTPREL16_HIGHESTA, 106)
+ RELOC_NUMBER (R_PPC64_REL16, 249)
+ RELOC_NUMBER (R_PPC64_REL16_LO, 250)
+ RELOC_NUMBER (R_PPC64_REL16_HI, 251)
+ RELOC_NUMBER (R_PPC64_REL16_HA, 252)
+
/* These are GNU extensions to enable C++ vtable garbage collection. */
RELOC_NUMBER (R_PPC64_GNU_VTINHERIT, 253)
RELOC_NUMBER (R_PPC64_GNU_VTENTRY, 254)