summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2020-07-22 14:04:27 +0000
committerkettenis <kettenis@openbsd.org>2020-07-22 14:04:27 +0000
commit262f158fac9a523814adc5a049b94cc655895661 (patch)
tree9e40d069d0b99ea8b1843f84b3dd0ef6720865ec /gnu
parentconsole marker should be after : (diff)
downloadwireguard-openbsd-262f158fac9a523814adc5a049b94cc655895661.tar.xz
wireguard-openbsd-262f158fac9a523814adc5a049b94cc655895661.zip
Add a few missing elocations.
ok jasper@
Diffstat (limited to 'gnu')
-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)