From 262f158fac9a523814adc5a049b94cc655895661 Mon Sep 17 00:00:00 2001 From: kettenis Date: Wed, 22 Jul 2020 14:04:27 +0000 Subject: Add a few missing elocations. ok jasper@ --- gnu/usr.bin/binutils-2.17/bfd/elf64-ppc.c | 60 +++++++++++++++++++++++++++ gnu/usr.bin/binutils-2.17/include/elf/ppc64.h | 5 +++ 2 files changed, 65 insertions(+) (limited to 'gnu') 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) -- cgit v1.2.3-59-g8ed1b