binutils-gdb/ld/emulparams
John David Anglin a82e3815df hppa: Implement PA 2.0 symbolic relocations for long displacements
The PA 2.0 architecture introduced several new load and store
instructions with long displacements.  These include floating
point loads and stores for word mode, and integer and floating
point loads and stores for double words.  Currently, ld does
not correctly support symbolic relocations for these instructions.

If these are used, ld applies the standard R_PARISC_DPREL14R
relocation and corrupts the instruction.  This change uses
bfd_hppa_insn2fmt to determine the correct relocation format.

We need to check the computed displacement as the immediate
value used in these instruction must be a multiple of 4 or 8
depending on whether the access is for a word or double word.

A misaligned offset can potentially occur if the symbol is not
properly aligned or if $global$ (the global pointer) is not
double word aligned.  $global$ is provided as a .data section
start symbol.  The patch adjusts elf.sc and hppalinux.sh to
align .data to a 8-byte boundary in non-shared and non-pie
links.

2024-04-01  John David Anglin  <danglin@gcc.gnu.org>

	PR ld/31503

bfd/ChangeLog:

	* elf32-hppa.c (final_link_relocate): Output

ld/ChangeLog:

	* emulparams/hppalinux.sh (DATA_SECTION_ALIGNMENT): Define.
	* scripttempl/elf.sc: Align .data section to DATA_SECTION_ALIGNMENT
	when relocating.
2024-04-01 23:00:52 +00:00
..
aarch64cloudabi.sh
aarch64cloudabib.sh
aarch64elf32.sh
aarch64elf32b.sh
aarch64elf.sh
aarch64elfb.sh
aarch64fbsd.sh
aarch64fbsdb.sh
aarch64gnu.sh Add support for the aarch64-gnu target (GNU/Hurd on AArch64) 2024-01-08 09:51:58 +00:00
aarch64haiku.sh Fix haiku ld dependencies 2022-12-14 21:45:04 +10:30
aarch64linux32.sh
aarch64linux32b.sh
aarch64linux.sh
aarch64linuxb.sh
aarch64nto.sh ld: add support of QNX stack arguments for aarch64nto 2023-03-16 15:01:05 +01:00
aarch64pe.sh aarch64-pe support for LD, GAS and BFD 2022-10-19 10:57:12 +02:00
aix5ppc.sh
aix5rs6.sh
aixppc.sh
aixrs6.sh
alpha.sh
alphavms.sh
arc-endianness.sh
arc-nps.sh
arcelf.sh
arclinux_nps.sh
arclinux.sh
arcv2elf.sh
arcv2elfx.sh
arm64pe.sh Add an extra emulation called arm64pe to the aarch64pe emulation. 2023-01-05 11:00:35 +00:00
arm_wince_pe.sh
armelf_fbsd.sh
armelf_fuchsia.sh
armelf_haiku.sh Fix haiku ld dependencies 2022-12-14 21:45:04 +10:30
armelf_linux_eabi.sh
armelf_linux_fdpiceabi.sh
armelf_linux.sh
armelf_nacl.sh
armelf_nbsd.sh
armelf_phoenix.sh
armelf_vxworks.sh
armelf.sh Add support for the .gnu.sgstubs section to the linker for ARM/ELF based targets. 2023-04-17 15:48:45 +01:00
armelfb_fbsd.sh
armelfb_fuchsia.sh
armelfb_linux_eabi.sh
armelfb_linux_fdpiceabi.sh
armelfb_linux.sh
armelfb_nacl.sh
armelfb_nbsd.sh
armelfb.sh
armnto.sh
armpe.sh
avr1.sh
avr2.sh
avr3.sh
avr4.sh
avr5.sh
avr6.sh
avr25.sh
avr31.sh
avr35.sh
avr51.sh
avrtiny.sh
avrxmega1.sh
avrxmega2_flmap.sh Support rodata in flash for more AVR devices 2023-12-12 11:29:16 +00:00
avrxmega2.sh Support rodata in flash for more AVR devices 2023-12-12 11:29:16 +00:00
avrxmega3.sh
avrxmega4_flmap.sh Support rodata in flash for more AVR devices 2023-12-12 11:29:16 +00:00
avrxmega4.sh Support rodata in flash for more AVR devices 2023-12-12 11:29:16 +00:00
avrxmega5.sh
avrxmega6.sh
avrxmega7.sh
call_nop.sh
cet.sh
crisaout.sh
criself.sh
crislinux.sh
cskyelf_linux.sh
cskyelf.sh
d10velf.sh
d30v_e.sh
d30v_o.sh
d30velf.sh
dt-relr.sh
dynamic_undefined_weak.sh
elf32_dlx.sh
elf32_sparc_sol2.sh
elf32_sparc_vxworks.sh
elf32_sparc.sh
elf32_spu.sh
elf32_tic6x_be.sh
elf32_tic6x_elf_be.sh
elf32_tic6x_elf_le.sh
elf32_tic6x_le.sh
elf32_tic6x_linux_be.sh
elf32_tic6x_linux_le.sh
elf32_x86_64.sh x86-64: Add -z mark-plt and -z nomark-plt 2023-09-29 07:58:53 -07:00
elf32am33lin.sh
elf32b4300.sh
elf32bfin.sh
elf32bfinfd.sh
elf32bmip.sh
elf32bmipn32-defs.sh
elf32bmipn32.sh
elf32briscv_ilp32.sh
elf32briscv_ilp32f.sh
elf32briscv.sh
elf32bsmip.sh
elf32btsmip_fbsd.sh
elf32btsmip.sh
elf32btsmipn32_fbsd.sh
elf32btsmipn32.sh
elf32cr16.sh
elf32crx.sh
elf32ebmip.sh
elf32ebmipvxworks.sh
elf32elmip.sh
elf32elmipvxworks.sh
elf32epiphany_4x4.sh
elf32epiphany.sh
elf32fr30.sh
elf32frv.sh
elf32frvfd.sh
elf32ft32.sh
elf32ip2k.sh
elf32iq10.sh
elf32iq2000.sh
elf32kvx.sh Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
elf32l4300.sh
elf32lm32.sh
elf32lm32fd.sh
elf32lmip.sh
elf32loongarch-defs.sh
elf32loongarch.sh
elf32lppc.sh
elf32lppclinux.sh
elf32lppcnto.sh
elf32lppcsim.sh
elf32lr5900.sh
elf32lr5900n32.sh
elf32lriscv_ilp32.sh
elf32lriscv_ilp32f.sh
elf32lriscv-defs.sh RISC-V: Protect .got with relro 2023-09-25 12:36:58 +02:00
elf32lriscv.sh
elf32lsmip.sh
elf32ltsmip_fbsd.sh
elf32ltsmip.sh
elf32ltsmipn32_fbsd.sh
elf32ltsmipn32.sh
elf32m32c.sh
elf32mb_linux.sh
elf32mbel_linux.sh
elf32mcore.sh ld: Put all emulation options in ldlex.h 2024-01-19 05:35:16 -08:00
elf32mep.sh
elf32metag.sh
elf32microblaze.sh
elf32microblazeel.sh
elf32mipswindiss.sh
elf32moxie.sh
elf32mt.sh
elf32or1k_linux.sh
elf32or1k.sh
elf32ppc_fbsd.sh
elf32ppc.sh
elf32ppccommon.sh
elf32ppchaiku.sh Fix haiku ld dependencies 2022-12-14 21:45:04 +10:30
elf32ppclinux.sh
elf32ppcnto.sh
elf32ppcsim.sh
elf32ppcvxworks.sh
elf32ppcwindiss.sh
elf32rl78.sh
elf32rx_linux.sh
elf32rx.sh
elf32tilegx_be.sh
elf32tilegx.sh
elf32tilepro.sh
elf32vax.sh
elf32visium.sh
elf32xstormy16.sh
elf32xtensa.sh
elf32z80.sh
elf64_aix.sh
elf64_ia64_fbsd.sh
elf64_ia64_vms.sh
elf64_ia64.sh
elf64_s390.sh Revert "2.41 Release sources" 2023-08-02 12:06:23 +01:00
elf64_sparc_fbsd.sh
elf64_sparc_sol2.sh
elf64_sparc.sh
elf64alpha_fbsd.sh
elf64alpha_nbsd.sh
elf64alpha.sh
elf64bmip-defs.sh MIPS/LD: Include n64 `.interp' with INITIAL_READONLY_SECTIONS 2023-07-28 06:00:36 +01:00
elf64bmip.sh
elf64bpf.sh
elf64briscv_lp64.sh
elf64briscv_lp64f.sh
elf64briscv.sh
elf64btsmip_fbsd.sh
elf64btsmip.sh
elf64hppa.sh
elf64kvx_linux.sh Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
elf64kvx.sh Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
elf64loongarch-defs.sh
elf64loongarch.sh
elf64lppc_fbsd.sh
elf64lppc.sh
elf64lriscv_lp64.sh
elf64lriscv_lp64f.sh
elf64lriscv-defs.sh RISC-V: Protect .got with relro 2023-09-25 12:36:58 +02:00
elf64lriscv.sh
elf64ltsmip_fbsd.sh
elf64ltsmip.sh
elf64mmix.sh
elf64ppc_fbsd.sh
elf64ppc.sh Re: PowerPC64 .branch_lt address 2022-07-25 09:49:41 +09:30
elf64rdos.sh
elf64tilegx_be.sh
elf64tilegx.sh
elf_fbsd.sh
elf_haiku.sh
elf_i386_be.sh
elf_i386_fbsd.sh
elf_i386_haiku.sh
elf_i386_ldso.sh
elf_i386_sol2.sh
elf_i386_vxworks.sh
elf_i386.sh ld: Add lib32 directories for 32-bit emulation on FreeBSD/amd64 2023-12-21 12:51:26 +01:00
elf_iamcu.sh
elf_mipsel_haiku.sh Fix haiku ld dependencies 2022-12-14 21:45:04 +10:30
elf_nacl.sh
elf_s390.sh Revert "2.41 Release sources" 2023-08-02 12:06:23 +01:00
elf_x86_64_cloudabi.sh
elf_x86_64_fbsd.sh
elf_x86_64_haiku.sh Fix haiku ld dependencies 2022-12-14 21:45:04 +10:30
elf_x86_64_sol2.sh
elf_x86_64.sh x86-64: Add -z mark-plt and -z nomark-plt 2023-09-29 07:58:53 -07:00
extern_protected_data.sh
h8300elf_linux.sh
h8300elf.sh
h8300helf_linux.sh
h8300helf.sh
h8300hnelf.sh
h8300self_linux.sh
h8300self.sh
h8300snelf.sh
h8300sxelf_linux.sh
h8300sxelf.sh
h8300sxnelf.sh
hppa64linux.sh
hppaelf.sh
hppalinux.sh hppa: Implement PA 2.0 symbolic relocations for long displacements 2024-04-01 23:00:52 +00:00
hppanbsd.sh
hppaobsd.sh
i386aout.sh
i386beos.sh
i386bsd.sh
i386go32.sh
i386lynx.sh
i386moss.sh
i386msdos.sh
i386nto.sh
i386pe_posix.sh
i386pe.sh
i386pep.sh
m9s12zelf.sh
m32relf_linux.sh
m32relf.sh
m32rlelf_linux.sh
m32rlelf.sh
m68hc11elf.sh
m68hc11elfb.sh
m68hc12elf.sh
m68hc12elfb.sh
m68kelf.sh
m68kelfnbsd.sh
mcorepe.sh
mmo.sh
mn10200.sh
mn10300.sh
moxiebox.sh
msp430elf.sh
msp430X.sh
nds32belf16m.sh
nds32belf_linux.sh
nds32belf.sh
nds32elf16m.sh
nds32elf_linux.sh
nds32elf.sh
nios2elf.sh
nios2linux.sh
ns32knbsd.sh
pc532macha.sh
pdp11.sh
pjelf.sh
pjlelf.sh
plt_unwind.sh ld: Put all emulation options in ldlex.h 2024-01-19 05:35:16 -08:00
ppcmacos.sh
pruelf.sh
README Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
reloc_overflow.sh
score3_elf.sh
score7_elf.sh
sh.sh
shelf_fd.sh
shelf_linux.sh
shelf_nbsd.sh
shelf_nto.sh
shelf_uclinux.sh
shelf_vxworks.sh
shelf.sh
shl.sh
shlelf_fd.sh
shlelf_linux.sh
shlelf_nbsd.sh
shlelf_nto.sh
shlelf_vxworks.sh
shlelf.sh
shpe.sh
solaris2.sh
static.sh
tic3xcoff_onchip.sh
tic3xcoff.sh
tic4xcoff.sh
tic30coff.sh
tic54xcoff.sh
v850_rh850.sh
v850.sh
vanilla.sh
vaxnbsd.sh
vxworks.sh
x86-64-lam.sh
x86-64-level.sh
x86-64-plt.sh ld: Add --enable-mark-plt configure option 2024-01-09 06:45:38 -08:00
x86-report-relative.sh
xgateelf.sh
z80.sh
z8001.sh
z8002.sh

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

The files in this directory are read by genscripts.sh as shell commands.
They set parameters for the emulations.

Copyright (C) 2012-2024 Free Software Foundation, Inc.

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.