diff options
| author | Aaron Merey <[email protected]> | 2025-10-24 18:41:30 -0400 |
|---|---|---|
| committer | Aaron Merey <[email protected]> | 2025-10-24 19:06:30 -0400 |
| commit | 3d6a50878c36418c91618e966193d3fd81db97f4 (patch) | |
| tree | 530c63b251bd77c8de07621121dbbd4bcb08f8fc /tests | |
| parent | cde995de0ae996fc68e4a983a48f8d027e11a472 (diff) | |
tests/run-ar.sh: disable PIC/PIE/PLT for ar-extract-ar binaries
Architecutres such as Debian i386 may enable PIE by default, resulting
in test binaries that include extra symbols such as
'__x86.get_pc_thunk.ax'.
These extra symbols are added to test archive symbol indices. This
changes ar-extract-ar output which causes test failures.
Include '-fno-pic -fno-pie -fno-plt' when compiling test binaries to
ensure that no extra symbols are added and no symbols are reordered.
Signed-off-by: Aaron Merey <[email protected]>
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/run-ar.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/run-ar.sh b/tests/run-ar.sh index 733d810d..3389035f 100755 --- a/tests/run-ar.sh +++ b/tests/run-ar.sh @@ -66,7 +66,7 @@ EOF # Compile the source files. for src in *.c; do obj=$(echo "$src" | sed 's/\.c$/.o/') - gcc -O0 -c "$src" -o "$obj" + gcc -O0 -fno-pic -fno-pie -fno-plt -c "$src" -o "$obj" done echo Create nested archives. |
