From 6e2bf930a090b0676148d9d908a672fbbf787edd Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Thu, 15 Jul 1999 02:06:03 +0000 Subject: =?UTF-8?q?=C3=A8=20=20=20=20=20=20=20=20=20*=20elf-hppa.h=20(=5Fb?= =?UTF-8?q?fd=5Felf=5Fhppa=5Fgen=5Freloc=5Ftype,=20case=20R=5FHPPA):=20Han?= =?UTF-8?q?dle=20=20=20=20=20=20=20=20=2064bit=20format.=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20(=5Fbfd=5Felf=5Fhppa=5Fgen=5Freloc=5Ftype,=20case=20R?= =?UTF-8?q?=5FGOTOFF):=20Use=20base=20reloc=20type=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20to=20derive=20final=20type=20instead=20of=20hardwiring=20a?= =?UTF-8?q?=20selection.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bfd/elf-hppa.h | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'bfd') diff --git a/bfd/elf-hppa.h b/bfd/elf-hppa.h index e692c0f..26c863b 100644 --- a/bfd/elf-hppa.h +++ b/bfd/elf-hppa.h @@ -292,6 +292,9 @@ static reloc_howto_type elf_hppa_howto_table[ELF_HOWTO_TABLE_SIZE] = {R_PARISC_LTOFF_TP16DF, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_LTOFF_TP16DF", false, 0, 0, false}, }; +#define OFFSET_14R_FROM_21L 4 +#define OFFSET_14F_FROM_21L 5 + /* Return one (or more) BFD relocations which implement the base relocation with modifications based on format and field. */ @@ -404,6 +407,18 @@ _bfd_elf_hppa_gen_reloc_type (abfd, base_type, format, field, ignore, sym) } break; + case 64: + switch (field) + { + case e_fsel: + final_type = R_PARISC_DIR64; + break; + case e_psel: + default: + return NULL; + } + break; + default: return NULL; } @@ -418,10 +433,10 @@ _bfd_elf_hppa_gen_reloc_type (abfd, base_type, format, field, ignore, sym) { case e_rsel: case e_rrsel: - final_type = R_PARISC_DPREL14R; + final_type = base_type + OFFSET_14R_FROM_21L; break; case e_fsel: - final_type = R_PARISC_DPREL14F; + final_type = base_type + OFFSET_14F_FROM_21L; break; default: return NULL; @@ -433,7 +448,7 @@ _bfd_elf_hppa_gen_reloc_type (abfd, base_type, format, field, ignore, sym) { case e_lrsel: case e_lsel: - final_type = R_PARISC_DPREL21L; + final_type = base_type; break; default: return NULL; -- cgit v1.1