ld: Enable using separate linker script for -z relro
authorAndreas Krebbel <krebbel@linux.vnet.ibm.com>
Mon, 11 Jun 2018 11:23:00 +0000 (13:23 +0200)
committerAndreas Krebbel <krebbel@linux.ibm.com>
Wed, 18 Jul 2018 11:20:06 +0000 (13:20 +0200)
commita38137289e91fd548fc27fb6566a439233b94d65
tree6cfffbd27fb55feb22dc50b2c935cc047d0687a0
parent0984c34e7683e1e987eaf4f9e057b678cb67efa6
ld: Enable using separate linker script for -z relro

With this patch dedicated linker scripts can be generated for partial
relro triggered by defining GENERATE_RELRO_SCRIPT in the target
specific scripts.

This is necessary for e.g. S/390 where usually the .got.plt comes
first and prevents the relro segment from being extended across the
non-plt GOT entries.

The patch started with the work from Marcin taken from the mwk user
branches.  However, the patch needed substantial changes due to the
'separate code' feature which got committed in the meantime.

ld/ChangeLog:

2018-07-18  Andreas Krebbel  <krebbel@linux.ibm.com>
    Marcin Koƛcielnicki <koriakin@0x04.net>

* emultempl/elf32.em: Add code to pick dedicated linker scripts
for partial relro.
* genscripts.sh: Generate dedicated linker scripts for partial relro.
ld/emultempl/elf32.em
ld/genscripts.sh
This page took 0.023665 seconds and 4 git commands to generate.