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.