aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2022-10-14 13:09:51 +0200
committerTom de Vries <tdevries@suse.de>2022-10-14 13:09:51 +0200
commitf98a7af815ce6f656eebe95e8dc21b63bb8ec9d2 (patch)
tree2f48f2494dc5df4efab6881437b87c5aa72505cc /gdb/testsuite
parent21f507efad6bf16edf2432b65b763e7686349b8a (diff)
downloadgdb-f98a7af815ce6f656eebe95e8dc21b63bb8ec9d2.zip
gdb-f98a7af815ce6f656eebe95e8dc21b63bb8ec9d2.tar.gz
gdb-f98a7af815ce6f656eebe95e8dc21b63bb8ec9d2.tar.bz2
[gdb/testsuite] Fix gdb.base/infoline-reloc-main-from-zero.exp with PIE
With test-case gdb.base/infoline-reloc-main-from-zero.exp and target board unix/-fPIE/-pie I run into: ... gdb compile failed, ld: infoline-reloc-main-from-zero: error: \ PHDR segment not covered by LOAD segment collect2: error: ld returned 1 exit status ... When running with native, I find that the executable is static: ... $ file infoline-reloc-main-from-zero infoline-reloc-main-from-zero: ELF 64-bit LSB executable, x86-64, \ version 1 (SYSV), statically linked, BuildID[sha1]=$hex, with debug_info, \ not stripped ... despite not having been compiled with -static. Fix the compilation by adding -static to the compilation flags. Tested on x86_64-linux.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/gdb.base/infoline-reloc-main-from-zero.exp1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/infoline-reloc-main-from-zero.exp b/gdb/testsuite/gdb.base/infoline-reloc-main-from-zero.exp
index c1391ee..93c7295 100644
--- a/gdb/testsuite/gdb.base/infoline-reloc-main-from-zero.exp
+++ b/gdb/testsuite/gdb.base/infoline-reloc-main-from-zero.exp
@@ -28,6 +28,7 @@ standard_testfile .c
set opts {}
lappend opts debug
lappend opts "ldflags=-nostdlib -emain -Wl,-Ttext=0x00 -Wl,-N"
+lappend opts additional_flags=-static
set ld_flags ldflags=-Wl,--no-warn-rwx-segments
if { [gdb_can_simple_compile ld-flags {int main () { return 0; }} executable \