[PATCH v2 0/6] ld: Pass $NOPIE_CFLAGS and $NOPIE_LDFLAGS to more tests
Jens Remus
jremus@linux.ibm.com
Fri Mar 21 16:58:17 GMT 2025
Changes in V2:
- Include missing patch 1. My aplologies!
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.
Patch 1 fixes a test name mixup discovered while fixing the default PIE
issue in subject linker test.
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
Jens Remus (6):
ld: Correct test pr19719 naming mix-up
ld: Pass $NOPIE_CFLAGS and $NOPIE_LDFLAGS to test pr19719
ld: Pass $NOPIE_CFLAGS and $NOPIE_LDFLAGS to test pr21964-4
ld: Pass $NOPIE_CFLAGS and $NOPIE_LDFLAGS to even more ELF shared
tests
ld: Pass $NOPIE_CFLAGS and $NOPIE_LDFLAGS to more ELF visibility tests
x86: Pass $NOPIE_LDFLAGS to undefined weak tests
ld/testsuite/ld-elf/shared.exp | 14 ++++++-------
ld/testsuite/ld-shared/shared.exp | 34 ++++++++++++++++---------------
ld/testsuite/ld-vsb/vsb.exp | 16 ++++++++-------
ld/testsuite/ld-x86-64/x86-64.exp | 4 ++--
4 files changed, 36 insertions(+), 32 deletions(-)
--
2.45.2
More information about the Binutils
mailing list