Support PIE on Solaris 12

Rainer Orth ro@CeBiTec.Uni-Bielefeld.DE
Tue Sep 1 11:08:00 GMT 2015


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



More information about the Binutils mailing list