public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/26031] New: exec_is_pie doesn't work with gold
@ 2020-05-24 8:55 vries at gcc dot gnu.org
2020-05-24 9:03 ` [Bug testsuite/26031] " vries at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: vries at gcc dot gnu.org @ 2020-05-24 8:55 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26031
Bug ID: 26031
Summary: exec_is_pie doesn't work with gold
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: testsuite
Assignee: unassigned at sourceware dot org
Reporter: vries at gcc dot gnu.org
Target Milestone: ---
There's a proc exec_is_pie in gdb.exp, which works by checking for the PIE flag
in the elf dynamic flags, as displayed by readelf -d.
This doesn't work when we're using the gold linker, since it doesn't add such a
flag, so this results in a lot of unnecessary:
...
gdb compile failed, pie failed to generate PIE executable
...
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug testsuite/26031] exec_is_pie doesn't work with gold
2020-05-24 8:55 [Bug testsuite/26031] New: exec_is_pie doesn't work with gold vries at gcc dot gnu.org
@ 2020-05-24 9:03 ` vries at gcc dot gnu.org
2020-05-25 10:02 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: vries at gcc dot gnu.org @ 2020-05-24 9:03 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26031
--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
Perhaps we should use this instead:
-no-pie:
...
$ gcc hello.c
$ readelf -h a.out | grep Type:
Type: EXEC (Executable file)
$ gcc hello.c -fuse-ld=gold
$ readelf -h a.out | grep Type:
Type: EXEC (Executable file)
...
vs -pie:
...
$ gcc hello.c -fPIE -pie
$ readelf -h a.out | grep Type:
Type: DYN (Shared object file)
$ gcc hello.c -fuse-ld=gold -fPIE -pie
$ readelf -h a.out | grep Type:
Type: DYN (Shared object file)
...
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug testsuite/26031] exec_is_pie doesn't work with gold
2020-05-24 8:55 [Bug testsuite/26031] New: exec_is_pie doesn't work with gold vries at gcc dot gnu.org
2020-05-24 9:03 ` [Bug testsuite/26031] " vries at gcc dot gnu.org
@ 2020-05-25 10:02 ` cvs-commit at gcc dot gnu.org
2020-05-25 10:03 ` vries at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-25 10:02 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26031
--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom de Vries <vries@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=465e1b0f196faea1fc949863af023b762ef86188
commit 465e1b0f196faea1fc949863af023b762ef86188
Author: Tom de Vries <tdevries@suse.de>
Date: Mon May 25 12:01:52 2020 +0200
[gdb/testsuite] Fix exec_is_pie with gold linker
When running test-case gdb.base/break-interp.exp with target board gold, we
run into:
...
gdb compile failed, pie failed to generate PIE executable
...
The problem is that the proc exec_is_pie uses the PIE flag in the readelf
-d
output, which doesn't seem to be set by the gold linker.
Instead, use the "Type" field in the readelf -h output.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2020-05-25 Tom de Vries <tdevries@suse.de>
PR testsuite/26031
* lib/gdb.exp (exec_is_pie): Test readelf -h output.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug testsuite/26031] exec_is_pie doesn't work with gold
2020-05-24 8:55 [Bug testsuite/26031] New: exec_is_pie doesn't work with gold vries at gcc dot gnu.org
2020-05-24 9:03 ` [Bug testsuite/26031] " vries at gcc dot gnu.org
2020-05-25 10:02 ` cvs-commit at gcc dot gnu.org
@ 2020-05-25 10:03 ` vries at gcc dot gnu.org
2020-05-25 10:05 ` schwab@linux-m68k.org
2020-05-25 10:20 ` vries at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: vries at gcc dot gnu.org @ 2020-05-25 10:03 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26031
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
patch fixing testsuite proc committed, marking resolved-fixed.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug testsuite/26031] exec_is_pie doesn't work with gold
2020-05-24 8:55 [Bug testsuite/26031] New: exec_is_pie doesn't work with gold vries at gcc dot gnu.org
` (2 preceding siblings ...)
2020-05-25 10:03 ` vries at gcc dot gnu.org
@ 2020-05-25 10:05 ` schwab@linux-m68k.org
2020-05-25 10:20 ` vries at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: schwab@linux-m68k.org @ 2020-05-25 10:05 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26031
--- Comment #4 from Andreas Schwab <schwab@linux-m68k.org> ---
Isn't that also a bug in gold?
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug testsuite/26031] exec_is_pie doesn't work with gold
2020-05-24 8:55 [Bug testsuite/26031] New: exec_is_pie doesn't work with gold vries at gcc dot gnu.org
` (3 preceding siblings ...)
2020-05-25 10:05 ` schwab@linux-m68k.org
@ 2020-05-25 10:20 ` vries at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: vries at gcc dot gnu.org @ 2020-05-25 10:20 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26031
--- Comment #5 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Andreas Schwab from comment #4)
> Isn't that also a bug in gold?
Done: PR26039 - "gold doesn't add PIE flag"
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-05-25 10:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-24 8:55 [Bug testsuite/26031] New: exec_is_pie doesn't work with gold vries at gcc dot gnu.org
2020-05-24 9:03 ` [Bug testsuite/26031] " vries at gcc dot gnu.org
2020-05-25 10:02 ` cvs-commit at gcc dot gnu.org
2020-05-25 10:03 ` vries at gcc dot gnu.org
2020-05-25 10:05 ` schwab@linux-m68k.org
2020-05-25 10:20 ` vries at gcc dot gnu.org
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).