public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [gdb/testsuite] Fix gdb.base/infoline-reloc-main-from-zero.exp with recent ld
@ 2022-10-12 14:50 Tom de Vries
0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2022-10-12 14:50 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a2470500432334fe254ef10ddabcab239e8de828
commit a2470500432334fe254ef10ddabcab239e8de828
Author: Tom de Vries <tdevries@suse.de>
Date: Wed Oct 12 16:50:16 2022 +0200
[gdb/testsuite] Fix gdb.base/infoline-reloc-main-from-zero.exp with recent ld
On openSUSE Tumbleweed (with ld 2.39) and test-case
gdb.base/infoline-reloc-main-from-zero.exp, I get:
...
gdb compile failed, ld: warning: infoline-reloc-main-from-zero has a LOAD \
segment with RWX permissions
UNTESTED: gdb.base/infoline-reloc-main-from-zero.exp: \
infoline-reloc-main-from-zero.exp
...
Fix this by compiling with -Wl,--no-warn-rwx-segments.
Tested on x86_64-linux.
Diff:
---
gdb/testsuite/gdb.base/infoline-reloc-main-from-zero.exp | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
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 31e753a0c1c..35c2db00c07 100644
--- a/gdb/testsuite/gdb.base/infoline-reloc-main-from-zero.exp
+++ b/gdb/testsuite/gdb.base/infoline-reloc-main-from-zero.exp
@@ -25,7 +25,15 @@ standard_testfile .c
# Build executable with stripped startup code and text section starting at zero
-set opts {debug "additional_flags=-nostdlib -emain -Wl,-Ttext=0x00 -Wl,-N"}
+set opts {}
+lappend opts debug
+lappend opts "additional_flags=-nostdlib -emain -Wl,-Ttext=0x00 -Wl,-N"
+
+set ld_flags additional_flags=-Wl,--no-warn-rwx-segments
+if { [gdb_can_simple_compile ld-flags {int main () { return 0; }} executable \
+ $ld_flags] } {
+ lappend opts $ld_flags
+}
if {[build_executable $testfile.exp $testfile $srcfile $opts] == -1} {
untested "failed to compile"
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-10-12 14:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-12 14:50 [binutils-gdb] [gdb/testsuite] Fix gdb.base/infoline-reloc-main-from-zero.exp with recent ld Tom de Vries
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).