mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-15 04:31:49 +08:00
afca762f59
Currently on S/390 the .got.plt always comes first which prevents the GNU_RELRO segment from being extended across the non-plt GOT entries. Just swapping both unfortunately is not that simple since our ABI requires the _GLOBAL_OFFSET_TABLE_ symbol to point to the very beginning of the entire GOT. Of the 3 magic GOT entries the first is accessed via got pointer while second and third are being accessed via DT_PLTGOT. In order to keep them together we make DT_PLTGOT to point to the .got instead of .got.plt. However, this violates an assumption in the dynamic linker prelink undo code about the GOTPLT entries starting at DT_PLTGOT + 3. We got rid of this requirement with a Glibc patch already in version 2.24: https://sourceware.org/ml/libc-alpha/2016-06/msg01302.html So the S/390 relro GOT layout will look like this with this patch: +----------------------------------+ |got[0]: DYNAMIC | <--- _GLOBAL_OFFSET_TABLE_ == DT_PLTGOT .got |got[1]: link_map parm | |got[2]: &_dl_runtime_resolve | +----------------------------------+ | | non-plt GOT entries | | | | +----------------------------------+ | | <--- .gotplt, PLT GOT entries | | | | | | +----------------------------------+ The patch detects the current layout in size_dynamic_section in order to deal also with linker scripts not generated by this ld version. With partial relro enabled we pick a linker script where .got and .got.plt are swapped which then triggers the rest of the logic. ld/ChangeLog: 2018-07-18 Andreas Krebbel <krebbel@linux.ibm.com> * emulparams/elf64_s390.sh: Define GENERATE_RELRO_SCRIPT and SEPARATE_GOTPLT. * testsuite/ld-s390/gotreloc_64-relro-1.dd: New test. * testsuite/ld-s390/gotreloc_64-norelro-1.dd: Renamed from ... * testsuite/ld-s390/gotreloc_64-1.dd: ... this. * testsuite/ld-s390/s390.exp: Split the GOT testcase into two. bfd/ChangeLog: 2018-07-18 Andreas Krebbel <krebbel@linux.ibm.com> * elf-s390-common.c (s390_gotplt_after_got_p): New function. (s390_got_pointer): New function. (s390_got_offset): New function. (s390_gotplt_offset): New function. * elf64-s390.c (allocate_dynrelocs): Adjust comment. (elf_s390_size_dynamic_sections): Move space for magic GOT entries from .got.plt to .got if necessary and pick the right location for _GLOBAL_OFFSET_TABLE_. (elf_s390_relocate_section): Use the wrapper functions from elf-s390-common.c to deal with both possible layouts (either .got or .got.plt first). (elf_s390_finish_dynamic_sections): Likewise. (elf_s390_finish_dynamic_symbol): Make the location of the GOT magic entries conditional. |
||
---|---|---|
.. | ||
aarch64cloudabi.sh | ||
aarch64cloudabib.sh | ||
aarch64elf32.sh | ||
aarch64elf32b.sh | ||
aarch64elf.sh | ||
aarch64elfb.sh | ||
aarch64fbsd.sh | ||
aarch64fbsdb.sh | ||
aarch64linux32.sh | ||
aarch64linux32b.sh | ||
aarch64linux.sh | ||
aarch64linuxb.sh | ||
aix5ppc.sh | ||
aix5rs6.sh | ||
aixppc.sh | ||
aixrs6.sh | ||
alpha.sh | ||
alphavms.sh | ||
arc-endianness.sh | ||
arc-nps.sh | ||
arcelf_prof.sh | ||
arcelf.sh | ||
arclinux_nps.sh | ||
arclinux_prof.sh | ||
arclinux.sh | ||
arcv2elf.sh | ||
arcv2elfx.sh | ||
arm_wince_pe.sh | ||
armelf_fbsd.sh | ||
armelf_fuchsia.sh | ||
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 | ||
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 | ||
armsymbian.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.sh | ||
avrxmega3.sh | ||
avrxmega4.sh | ||
avrxmega5.sh | ||
avrxmega6.sh | ||
avrxmega7.sh | ||
call_nop.sh | ||
cet.sh | ||
crisaout.sh | ||
criself.sh | ||
crislinux.sh | ||
d10velf.sh | ||
d30v_e.sh | ||
d30v_o.sh | ||
d30velf.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_nacl.sh | ||
elf32_x86_64.sh | ||
elf32am33lin.sh | ||
elf32b4300.sh | ||
elf32bfin.sh | ||
elf32bfinfd.sh | ||
elf32bmip.sh | ||
elf32bmipn32-defs.sh | ||
elf32bmipn32.sh | ||
elf32bsmip.sh | ||
elf32btsmip_fbsd.sh | ||
elf32btsmip.sh | ||
elf32btsmipn32_fbsd.sh | ||
elf32btsmipn32.sh | ||
elf32cr16.sh | ||
elf32cr16c.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 | ||
elf32l4300.sh | ||
elf32lm32.sh | ||
elf32lm32fd.sh | ||
elf32lmip.sh | ||
elf32lppc.sh | ||
elf32lppclinux.sh | ||
elf32lppcnto.sh | ||
elf32lppcsim.sh | ||
elf32lr5900.sh | ||
elf32lr5900n32.sh | ||
elf32lriscv_ilp32.sh | ||
elf32lriscv_ilp32f.sh | ||
elf32lriscv-defs.sh | ||
elf32lriscv.sh | ||
elf32lsmip.sh | ||
elf32ltsmip_fbsd.sh | ||
elf32ltsmip.sh | ||
elf32ltsmipn32_fbsd.sh | ||
elf32ltsmipn32.sh | ||
elf32m32c.sh | ||
elf32mb_linux.sh | ||
elf32mbel_linux.sh | ||
elf32mcore.sh | ||
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 | ||
elf32ppclinux.sh | ||
elf32ppcnto.sh | ||
elf32ppcsim.sh | ||
elf32ppcvxworks.sh | ||
elf32ppcwindiss.sh | ||
elf32rl78.sh | ||
elf32rx.sh | ||
elf32tilegx_be.sh | ||
elf32tilegx.sh | ||
elf32tilepro.sh | ||
elf32vax.sh | ||
elf32visium.sh | ||
elf32xc16x.sh | ||
elf32xc16xl.sh | ||
elf32xc16xs.sh | ||
elf32xstormy16.sh | ||
elf32xtensa.sh | ||
elf64_aix.sh | ||
elf64_ia64_fbsd.sh | ||
elf64_ia64_vms.sh | ||
elf64_ia64.sh | ||
elf64_s390.sh | ||
elf64_sparc_fbsd.sh | ||
elf64_sparc_sol2.sh | ||
elf64_sparc.sh | ||
elf64alpha_fbsd.sh | ||
elf64alpha_nbsd.sh | ||
elf64alpha.sh | ||
elf64bmip-defs.sh | ||
elf64bmip.sh | ||
elf64btsmip_fbsd.sh | ||
elf64btsmip.sh | ||
elf64hppa.sh | ||
elf64lppc.sh | ||
elf64lriscv_lp64.sh | ||
elf64lriscv_lp64f.sh | ||
elf64lriscv-defs.sh | ||
elf64lriscv.sh | ||
elf64ltsmip_fbsd.sh | ||
elf64ltsmip.sh | ||
elf64mmix.sh | ||
elf64ppc_fbsd.sh | ||
elf64ppc.sh | ||
elf64rdos.sh | ||
elf64tilegx_be.sh | ||
elf64tilegx.sh | ||
elf_fbsd.sh | ||
elf_i386_be.sh | ||
elf_i386_chaos.sh | ||
elf_i386_fbsd.sh | ||
elf_i386_ldso.sh | ||
elf_i386_nacl.sh | ||
elf_i386_sol2.sh | ||
elf_i386_vxworks.sh | ||
elf_i386.sh | ||
elf_iamcu.sh | ||
elf_k1om_fbsd.sh | ||
elf_k1om.sh | ||
elf_l1om_fbsd.sh | ||
elf_l1om.sh | ||
elf_nacl.sh | ||
elf_s390.sh | ||
elf_x86_64_cloudabi.sh | ||
elf_x86_64_fbsd.sh | ||
elf_x86_64_nacl.sh | ||
elf_x86_64_sol2.sh | ||
elf_x86_64.sh | ||
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 | ||
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 | ||
ppclynx.sh | ||
ppcmacos.sh | ||
ppcpe.sh | ||
pruelf.sh | ||
README | ||
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 | ||
tic3xcoff_onchip.sh | ||
tic3xcoff.sh | ||
tic4xcoff.sh | ||
tic30aout.sh | ||
tic30coff.sh | ||
tic54xcoff.sh | ||
tic80coff.sh | ||
v850_rh850.sh | ||
v850.sh | ||
vanilla.sh | ||
vaxnbsd.sh | ||
vxworks.sh | ||
xgateelf.sh | ||
z80.sh | ||
z8001.sh | ||
z8002.sh |
The files in this directory are read by genscripts.sh as shell commands.
They set parameters for the emulations.
Copyright (C) 2012-2018 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.