Support PIE on Solaris 12
Rainer Orth
ro@CeBiTec.Uni-Bielefeld.DE
Tue Aug 25 11:52:00 GMT 2015
As mentioned in
https://gcc.gnu.org/ml/gcc-patches/2015-08/msg01389.html
Solaris 12 will gain support for Position Independent Executables
(PIE). The following patch implements the changes to ld (and a minor
readelf addition) to handle this. Effectively it's only setting the new
DF_1_PIE flag.
The patch was tested with an early version of the new PIC CRTs, the PIE
patch from the message above, and mainline gcc configured both without
and with --enable-default-pie.
Ok for mainline?
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
2015-08-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
ld:
* emulparams/solaris2.sh (GENERATE_PIE_SCRIPT): Set to yes.
* emultempl/elf32.em (ld_${EMULATION_NAME}_emulation): Allow
overriding gld${EMULATION_NAME}_handle_option.
* emultempl/solaris2.em: Include ldlex.h.
(gld${EMULATION_NAME}_handle_option): Declare.
(elf_solaris2_handle_option): New function.
(LDEMUL_HANDLE_OPTION): Uset it.
include/elf:
* common.h (DF_1_PIE): Define.
binutils:
* readelf.c (process_dynamic_section): Handle DF_1_PIE.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sol12-pie.patch
Type: text/x-patch
Size: 2595 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20150825/acb7cdc5/attachment.bin>
More information about the Binutils
mailing list