aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2023-09-28 09:47:36 +0200
committerTom de Vries <tdevries@suse.de>2023-09-28 09:47:36 +0200
commit2654f77d1424f6172d3026c524e96e14b5752ba1 (patch)
treeccabb4c38049135dd45f83010e42b7c27d8649a2 /gdb
parentbe92e5342832bb0727c9bccba8bc325c5da43d95 (diff)
downloadgdb-2654f77d1424f6172d3026c524e96e14b5752ba1.zip
gdb-2654f77d1424f6172d3026c524e96e14b5752ba1.tar.gz
gdb-2654f77d1424f6172d3026c524e96e14b5752ba1.tar.bz2
[gdb/testsuite] Add nopie to gdb.base/unwind-on-each-insn-amd64-2.exp
When running test-case gdb.base/unwind-on-each-insn-amd64-2.exp with target board unix/-fPIE/-pie, I run into: ... gdb compile failed, ld: unwind-on-each-insn-amd64-21.o: relocation \ R_X86_64_32S against `.text' can not be used when making a PIE object; \ recompile with -fPIE ld: failed to set dynamic section sizes: bad value ... Fix this by hardcoding nopie in the test-case, and for good measure in the other test-cases that source unwind-on-each-insn.exp.tcl and use a .s file. Tested on x86_64-linux. Approved-by: Kevin Buettner <kevinb@redhat.com>
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/gdb.base/unwind-on-each-insn-amd64-2.exp11
-rw-r--r--gdb/testsuite/gdb.base/unwind-on-each-insn-amd64.exp8
-rw-r--r--gdb/testsuite/gdb.base/unwind-on-each-insn-i386.exp8
-rw-r--r--gdb/testsuite/gdb.base/unwind-on-each-insn.exp1
-rw-r--r--gdb/testsuite/gdb.base/unwind-on-each-insn.exp.tcl2
5 files changed, 23 insertions, 7 deletions
diff --git a/gdb/testsuite/gdb.base/unwind-on-each-insn-amd64-2.exp b/gdb/testsuite/gdb.base/unwind-on-each-insn-amd64-2.exp
index c8a94cc..8675ba2 100644
--- a/gdb/testsuite/gdb.base/unwind-on-each-insn-amd64-2.exp
+++ b/gdb/testsuite/gdb.base/unwind-on-each-insn-amd64-2.exp
@@ -17,8 +17,15 @@
require is_x86_64_m64_target
-set srcfile_flags {debug}
-set srcfile2_flags {nodebug}
+set srcfile_flags {}
+lappend srcfile_flags debug
+lappend srcfile_flags nopie
+
+set srcfile2_flags {}
+lappend srcfile2_flags nodebug
+lappend srcfile_flags nopie
+
+set ldflags $srcfile_flags
if [info exists COMPILE] {
# Make sure that we use .eh_frame info, by generating it
diff --git a/gdb/testsuite/gdb.base/unwind-on-each-insn-amd64.exp b/gdb/testsuite/gdb.base/unwind-on-each-insn-amd64.exp
index cec4a2d..e7c22d4 100644
--- a/gdb/testsuite/gdb.base/unwind-on-each-insn-amd64.exp
+++ b/gdb/testsuite/gdb.base/unwind-on-each-insn-amd64.exp
@@ -17,8 +17,12 @@
require is_x86_64_m64_target
-set srcfile_flags {debug}
-set srcfile2_flags {debug}
+set srcfile_flags {}
+lappend srcfile_flags debug
+lappend srcfile_flags nopie
+
+set srcfile2_flags $srcfile_flags
+set ldflags $srcfile_flags
if [info exists COMPILE] {
standard_testfile unwind-on-each-insn.c unwind-on-each-insn-foo.c
diff --git a/gdb/testsuite/gdb.base/unwind-on-each-insn-i386.exp b/gdb/testsuite/gdb.base/unwind-on-each-insn-i386.exp
index 5e9f609..255ed09 100644
--- a/gdb/testsuite/gdb.base/unwind-on-each-insn-i386.exp
+++ b/gdb/testsuite/gdb.base/unwind-on-each-insn-i386.exp
@@ -17,8 +17,12 @@
require is_x86_like_target
-set srcfile_flags {debug}
-set srcfile2_flags {debug}
+set srcfile_flags {}
+lappend srcfile_flags debug
+lappend srcfile_flags nopie
+
+set srcfile2_flags $srcfile_flags
+set ldflags $srcfile_flags
if [info exists COMPILE] {
standard_testfile unwind-on-each-insn.c unwind-on-each-insn-foo.c
diff --git a/gdb/testsuite/gdb.base/unwind-on-each-insn.exp b/gdb/testsuite/gdb.base/unwind-on-each-insn.exp
index 2fc6d30..b5fc257 100644
--- a/gdb/testsuite/gdb.base/unwind-on-each-insn.exp
+++ b/gdb/testsuite/gdb.base/unwind-on-each-insn.exp
@@ -17,6 +17,7 @@ standard_testfile .c -foo.c
set srcfile_flags {debug}
set srcfile2_flags {nodebug}
+set ldflags {debug}
# Make sure that we don't use .eh_frame info, by not generating it,
# using -fno-asynchronous-unwind-tables, if supported.
diff --git a/gdb/testsuite/gdb.base/unwind-on-each-insn.exp.tcl b/gdb/testsuite/gdb.base/unwind-on-each-insn.exp.tcl
index 1b6840e..82404d1 100644
--- a/gdb/testsuite/gdb.base/unwind-on-each-insn.exp.tcl
+++ b/gdb/testsuite/gdb.base/unwind-on-each-insn.exp.tcl
@@ -24,7 +24,7 @@
# value, can be calculated correctly.
if {[prepare_for_testing_full "failed to prepare" \
- [list ${testfile} {debug} \
+ [list ${testfile} $ldflags \
$srcfile $srcfile_flags $srcfile2 $srcfile2_flags]]} {
return -1
}