[PATCH v2 0/6] ld: Pass $NOPIE_CFLAGS and $NOPIE_LDFLAGS to more tests

Jens Remus jremus@linux.ibm.com
Wed Mar 26 17:27:24 GMT 2025


Hello Jan!

On 21.03.2025 17:58, Jens Remus wrote:

> Some distributions configure GCC with --enable-default-pie [1].  This
> causes compiles to default to -fPIE and links to default to -pie, unless
> other options are explicitly given.  As a consequence several linker
> tests are compiled and linked in unexpected ways and may even
> unexpectedly fail or pass.  Compile more non-PIC/PIE test sources with
> $NOPIE_CFLAGS and link more test programs with $NOPIE_LDFLAGS.

> Patches 2-5 fix linker test cases that expect to be compiled non-PIC and
> linked as position-dependent executable (PDE; non-PIE).
> 
> [1]: GCC Installation manual, step "Configuration", section
>       "--enable-default-pie", https://gcc.gnu.org/install/configure.html

Thank you very much for reviewing the patches!  Would you be ok with me
waiting to commit those to mainline, that you have approved that relate
to selectively nullifying GCC configured with --eanble-default-pie,
until my RFC patch "[RFC PATCH] ld: Nullify GCC default PIE in all
linker tests" has received any feedback?  From my perspective my RFC
patch would be the preferable global solution, that would then make the
respective patches from this series superfluous.

Thanks and regards,
Jens
-- 
Jens Remus
Linux on Z Development (D3303)
+49-7031-16-1128 Office
jremus@de.ibm.com

IBM

IBM Deutschland Research & Development GmbH; Vorsitzender des Aufsichtsrats: Wolfgang Wendt; Geschäftsführung: David Faller; Sitz der Gesellschaft: Böblingen; Registergericht: Amtsgericht Stuttgart, HRB 243294
IBM Data Privacy Statement: https://www.ibm.com/privacy/



More information about the Binutils mailing list