From a4bd839069db2337a6d8e219782aff38875699a7 Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Thu, 12 Jul 2001 01:24:14 +0000 Subject: [PATCH] sje patch for 32-bit IA-64 ELF relocs for HPUX * reloc.c (bfd_reloc_code_type): Add IA64 relocs BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elfxx-ia64.c (ia64_howto_table): Define how to handle new relocations. (elfNN_ia64_reloc_type_lookup): Handle new relocations. (elfNN_ia64_check_relocs): Likewise. (elfNN_ia64_install_value): Likewise. (elfNN_ia64_relocate_section): Likewise. --- bfd/ChangeLog | 13 +++++++++++++ bfd/bfd-in2.h | 2 ++ bfd/elfxx-ia64.c | 10 ++++++++++ bfd/libbfd.h | 2 ++ bfd/reloc.c | 4 ++++ 5 files changed, 31 insertions(+) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 6bc50e51192..795d06eeb1e 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,16 @@ +2001-07-11 Steve Ellcey + + * reloc.c (bfd_reloc_code_type): Add IA64 relocs + BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB + * bfd-in2.h: Regenerate. + * libbfd.h: Regenerate. + * elfxx-ia64.c (ia64_howto_table): Define how to handle + new relocations. + (elfNN_ia64_reloc_type_lookup): Handle new relocations. + (elfNN_ia64_check_relocs): Likewise. + (elfNN_ia64_install_value): Likewise. + (elfNN_ia64_relocate_section): Likewise. + 2001-07-11 Jakub Jelinek * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 724fa25847c..c20f8b0b65e 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -2672,6 +2672,8 @@ this offset in the reloc's section offset. */ BFD_RELOC_IA64_PCREL64LSB, BFD_RELOC_IA64_LTOFF_FPTR22, BFD_RELOC_IA64_LTOFF_FPTR64I, + BFD_RELOC_IA64_LTOFF_FPTR32MSB, + BFD_RELOC_IA64_LTOFF_FPTR32LSB, BFD_RELOC_IA64_LTOFF_FPTR64MSB, BFD_RELOC_IA64_LTOFF_FPTR64LSB, BFD_RELOC_IA64_SEGREL32MSB, diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c index 6d2d1910603..481834bb4db 100644 --- a/bfd/elfxx-ia64.c +++ b/bfd/elfxx-ia64.c @@ -360,6 +360,8 @@ static reloc_howto_type ia64_howto_table[] = IA64_HOWTO (R_IA64_LTOFF_FPTR22, "LTOFF_FPTR22", 0, false, true), IA64_HOWTO (R_IA64_LTOFF_FPTR64I, "LTOFF_FPTR64I", 0, false, true), + IA64_HOWTO (R_IA64_LTOFF_FPTR32MSB, "LTOFF_FPTR32MSB", 2, false, true), + IA64_HOWTO (R_IA64_LTOFF_FPTR32LSB, "LTOFF_FPTR32LSB", 2, false, true), IA64_HOWTO (R_IA64_LTOFF_FPTR64MSB, "LTOFF_FPTR64MSB", 4, false, true), IA64_HOWTO (R_IA64_LTOFF_FPTR64LSB, "LTOFF_FPTR64LSB", 4, false, true), @@ -480,6 +482,8 @@ elfNN_ia64_reloc_type_lookup (abfd, bfd_code) case BFD_RELOC_IA64_LTOFF_FPTR22: rtype = R_IA64_LTOFF_FPTR22; break; case BFD_RELOC_IA64_LTOFF_FPTR64I: rtype = R_IA64_LTOFF_FPTR64I; break; + case BFD_RELOC_IA64_LTOFF_FPTR32MSB: rtype = R_IA64_LTOFF_FPTR32MSB; break; + case BFD_RELOC_IA64_LTOFF_FPTR32LSB: rtype = R_IA64_LTOFF_FPTR32LSB; break; case BFD_RELOC_IA64_LTOFF_FPTR64MSB: rtype = R_IA64_LTOFF_FPTR64MSB; break; case BFD_RELOC_IA64_LTOFF_FPTR64LSB: rtype = R_IA64_LTOFF_FPTR64LSB; break; @@ -2007,6 +2011,8 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs) case R_IA64_LTOFF_FPTR22: case R_IA64_LTOFF_FPTR64I: + case R_IA64_LTOFF_FPTR32MSB: + case R_IA64_LTOFF_FPTR32LSB: case R_IA64_LTOFF_FPTR64MSB: case R_IA64_LTOFF_FPTR64LSB: need_entry = NEED_FPTR | NEED_GOT | NEED_LTOFF_FPTR; @@ -2814,6 +2820,7 @@ elfNN_ia64_install_value (abfd, hit_addr, val, r_type) case R_IA64_GPREL32MSB: case R_IA64_FPTR32MSB: case R_IA64_PCREL32MSB: + case R_IA64_LTOFF_FPTR32MSB: case R_IA64_SEGREL32MSB: case R_IA64_SECREL32MSB: case R_IA64_LTV32MSB: @@ -2824,6 +2831,7 @@ elfNN_ia64_install_value (abfd, hit_addr, val, r_type) case R_IA64_GPREL32LSB: case R_IA64_FPTR32LSB: case R_IA64_PCREL32LSB: + case R_IA64_LTOFF_FPTR32LSB: case R_IA64_SEGREL32LSB: case R_IA64_SECREL32LSB: case R_IA64_LTV32LSB: @@ -3678,6 +3686,8 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section, case R_IA64_LTOFF_FPTR22: case R_IA64_LTOFF_FPTR64I: + case R_IA64_LTOFF_FPTR32MSB: + case R_IA64_LTOFF_FPTR32LSB: case R_IA64_LTOFF_FPTR64MSB: case R_IA64_LTOFF_FPTR64LSB: { diff --git a/bfd/libbfd.h b/bfd/libbfd.h index 536d67ab5e6..d9ddc233005 100644 --- a/bfd/libbfd.h +++ b/bfd/libbfd.h @@ -1006,6 +1006,8 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_IA64_PCREL64LSB", "BFD_RELOC_IA64_LTOFF_FPTR22", "BFD_RELOC_IA64_LTOFF_FPTR64I", + "BFD_RELOC_IA64_LTOFF_FPTR32MSB", + "BFD_RELOC_IA64_LTOFF_FPTR32LSB", "BFD_RELOC_IA64_LTOFF_FPTR64MSB", "BFD_RELOC_IA64_LTOFF_FPTR64LSB", "BFD_RELOC_IA64_SEGREL32MSB", diff --git a/bfd/reloc.c b/bfd/reloc.c index 6d9b35b7f76..68cc75b30b0 100644 --- a/bfd/reloc.c +++ b/bfd/reloc.c @@ -2935,6 +2935,10 @@ ENUMX BFD_RELOC_IA64_LTOFF_FPTR22 ENUMX BFD_RELOC_IA64_LTOFF_FPTR64I +ENUMX + BFD_RELOC_IA64_LTOFF_FPTR32MSB +ENUMX + BFD_RELOC_IA64_LTOFF_FPTR32LSB ENUMX BFD_RELOC_IA64_LTOFF_FPTR64MSB ENUMX -- 2.30.2