* [PATCH][gdb/testsuite] Fix infoline-reloc-main-from-zero.exp compilation
@ 2019-06-17 10:19 Tom de Vries
2019-07-24 13:36 ` Tom Tromey
0 siblings, 1 reply; 2+ messages in thread
From: Tom de Vries @ 2019-06-17 10:19 UTC (permalink / raw)
To: gdb-patches
Hi,
When running gdb.base/infoline-reloc-main-from-zero.exp, I see:
...
Running gdb/testsuite/gdb.base/infoline-reloc-main-from-zero.exp ...
gdb compile failed, ld: infoline-reloc-main-from-zero: \
not enough room for program headers, try linking with -N
ld: final link failed: bad value
collect2: error: ld returned 1 exit status
UNTESTED: gdb.base/infoline-reloc-main-from-zero.exp: infoline-reloc-main-from-zero.exp
UNTESTED: gdb.base/infoline-reloc-main-from-zero.exp: failed to compile
...
Fix this by following the suggestion:
...
-set opts {debug "additional_flags=-nostdlib -emain -Wl,-Ttext=0x00"}
+set opts {debug "additional_flags=-nostdlib -emain -Wl,-Ttext=0x00 -Wl,-N"}
...
Tested on x86_64-linux.
OK for trunk?
Thanks,
- Tom
[gdb/testsuite] Fix infoline-reloc-main-from-zero.exp compilation
gdb/testsuite/ChangeLog:
2019-06-17 Tom de Vries <tdevries@suse.de>
PR testsuite/24612
* gdb.base/infoline-reloc-main-from-zero.exp: Add -Wl,-N to
additional_flags.
---
gdb/testsuite/gdb.base/infoline-reloc-main-from-zero.exp | 2 +-
1 file changed, 1 insertion(+), 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 99f577004e..670f611466 100644
--- a/gdb/testsuite/gdb.base/infoline-reloc-main-from-zero.exp
+++ b/gdb/testsuite/gdb.base/infoline-reloc-main-from-zero.exp
@@ -29,7 +29,7 @@ if [get_compiler_info] {
# Build executable with stripped startup code and text section starting at zero
-set opts {debug "additional_flags=-nostdlib -emain -Wl,-Ttext=0x00"}
+set opts {debug "additional_flags=-nostdlib -emain -Wl,-Ttext=0x00 -Wl,-N"}
if {[build_executable $testfile.exp $testfile $srcfile $opts] == -1} {
untested "failed to compile"
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH][gdb/testsuite] Fix infoline-reloc-main-from-zero.exp compilation
2019-06-17 10:19 [PATCH][gdb/testsuite] Fix infoline-reloc-main-from-zero.exp compilation Tom de Vries
@ 2019-07-24 13:36 ` Tom Tromey
0 siblings, 0 replies; 2+ messages in thread
From: Tom Tromey @ 2019-07-24 13:36 UTC (permalink / raw)
To: Tom de Vries; +Cc: gdb-patches
>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
Tom> gdb/testsuite/ChangeLog:
Tom> 2019-06-17 Tom de Vries <tdevries@suse.de>
Tom> PR testsuite/24612
Tom> * gdb.base/infoline-reloc-main-from-zero.exp: Add -Wl,-N to
Tom> additional_flags.
Thank you for the patch. This is ok.
Tom
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-24 13:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-17 10:19 [PATCH][gdb/testsuite] Fix infoline-reloc-main-from-zero.exp compilation Tom de Vries
2019-07-24 13:36 ` Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox