This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH]: More ELF32 support on IA64
- To: binutils at sources dot redhat dot com
- Subject: [PATCH]: More ELF32 support on IA64
- From: Steve Ellcey <sje at cup dot hp dot com>
- Date: Tue, 10 Jul 2001 16:16:01 -0700 (PDT)
- Reply-To: sje at cup dot hp dot com
HP-UX on IA64 needs a relocation for @ltoff(@fptr(s+a)) in 32 bit mode
ELF. There is already support for 64 bit mode ELF with MSB and LSB.
While HP-UX will not use the 32 bit LSB mode, I added that along with 32
bit MSB to be complete. The relocation numbers were already defined in
src/include/elf/ia64.h, they were just not handled in src/bfd/elfxx-ia64.c
I have a copyright assignment on file but no write permission to CVS.
Steve Ellcey
sje@cup.hp.com
2001-07-10 Steve Ellcey <sje@cup.hp.com>
* src/bfd/reloc.c (bfd_reloc_code_type): Add IA64 relocs
BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
* src/bfd/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.
*** src/bfd/reloc.c.orig Tue Jul 10 15:29:42 2001
--- src/bfd/reloc.c Tue Jul 10 15:31:52 2001
*************** ENUMX
*** 2936,2941 ****
--- 2936,2945 ----
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
BFD_RELOC_IA64_LTOFF_FPTR64LSB
*** src/bfd/elfxx-ia64.c.orig Tue Jul 10 15:32:21 2001
--- src/bfd/elfxx-ia64.c Tue Jul 10 15:44:19 2001
*************** static reloc_howto_type ia64_howto_table
*** 360,365 ****
--- 360,367 ----
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),
*************** elfNN_ia64_reloc_type_lookup (abfd, bfd_
*** 480,485 ****
--- 482,489 ----
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;
*************** elfNN_ia64_check_relocs (abfd, info, sec
*** 2007,2012 ****
--- 2011,2018 ----
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;
*************** elfNN_ia64_install_value (abfd, hit_addr
*** 2814,2819 ****
--- 2820,2826 ----
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:
*************** elfNN_ia64_install_value (abfd, hit_addr
*** 2824,2829 ****
--- 2831,2837 ----
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:
*************** elfNN_ia64_relocate_section (output_bfd,
*** 3678,3683 ****
--- 3686,3693 ----
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:
{