This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Support PIE on Solaris 12
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: binutils at sourceware dot org
- Date: Tue, 01 Sep 2015 13:08:28 +0200
- Subject: Re: Support PIE on Solaris 12
- Authentication-results: sourceware.org; auth=none
- References: <yddd1yb7fgm dot fsf at lokon dot CeBiTec dot Uni-Bielefeld dot DE>
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:
> 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?
This patch has remained unreviewed for a week:
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.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University