public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/29674] New: [gdb/testsuite] Test-cases untested due to "missing .note.GNU-stack section implies executable stack"
@ 2022-10-12 4:47 vries at gcc dot gnu.org
2022-10-12 4:54 ` [Bug testsuite/29674] " vries at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: vries at gcc dot gnu.org @ 2022-10-12 4:47 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29674
Bug ID: 29674
Summary: [gdb/testsuite] Test-cases untested due to "missing
.note.GNU-stack section implies executable stack"
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: ---
On openSUSE Tumbleweed, I'm running into:
...
Running
/data/vries/gdb_versions/devel/src/gdb/testsuite/gdb.dwarf2/fission-absolute-dwo.exp
...
gdb compile failed,
/usr/lib64/gcc/x86_64-suse-linux/12/../../../../x86_64-suse-linux/bin/ld:
warning:
/data/vries/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.dwarf2/fission-absolute-dwo/fission-absolute-dwo.o:
missing .note.GNU-stack section implies executable stack
/usr/lib64/gcc/x86_64-suse-linux/12/../../../../x86_64-suse-linux/bin/ld: NOTE:
This behaviour is deprecated and will be removed in a future version of the
linker
=== gdb Summary ===
# of untested testcases 1
...
Searching on the message finds a suggestion that this can be fixed with
-Wl,-znoexecstack, and indeed this fixes it:
...
diff --git a/gdb/testsuite/gdb.dwarf2/fission-absolute-dwo.exp
b/gdb/testsuite/gdb.dwa
rf2/fission-absolute-dwo.exp
index 53150237408..d094608bab5 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-absolute-dwo.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-absolute-dwo.exp
@@ -109,7 +109,8 @@ Dwarf::assemble $asm_file {
# Compile both source files to create the executable. As we compile
# ASM_FILE we split out the debug information into the dwo file.
set object_file [standard_output_file ${testfile}.o]
-if { [build_executable_and_dwo_files "${testfile}.exp" ${binfile} {nodebug} \
+if { [build_executable_and_dwo_files "${testfile}.exp" ${binfile} \
+ [list nodebug additional_flags=-Wl,-znoexecstack] \
[list $asm_file {nodebug split-dwo} ${object_file}] \
[list $srcfile {nodebug}]] } {
return -1
...
But it seems like a lot of work to update all the test-cases failing like this
(so, at least all the tests that use dwarf assembly) with this addition.
Looking at:
...
$ echo | gcc -x c - -S -o-
.file "<stdin>"
.text
.ident "GCC: (SUSE Linux) 12.2.1 20220830 [revision
e927d1cf141f221c5a32574bde0913307e140984]"
.section .note.GNU-stack,"",@progbits
...
maybe we can add this to each generated .S file as a header.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug testsuite/29674] [gdb/testsuite] Test-cases untested due to "missing .note.GNU-stack section implies executable stack"
2022-10-12 4:47 [Bug testsuite/29674] New: [gdb/testsuite] Test-cases untested due to "missing .note.GNU-stack section implies executable stack" vries at gcc dot gnu.org
@ 2022-10-12 4:54 ` vries at gcc dot gnu.org
2022-10-12 15:52 ` vries at gcc dot gnu.org
2022-10-27 15:17 ` vries at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: vries at gcc dot gnu.org @ 2022-10-12 4:54 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29674
--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
This also fixes it:
...
diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp
index b85ec290299..11f73af01ee 100644
--- a/gdb/testsuite/lib/dwarf.exp
+++ b/gdb/testsuite/lib/dwarf.exp
@@ -3283,6 +3283,8 @@ namespace eval Dwarf {
_write_deferred_output
+ _section .note.GNU-stack "" progbits
+
if { $file_id == "" } {
catch {close $_output_file}
}
...
Though for some reason % is used instead of @:
...
.section .note.GNU-stack, "", %progbits
...
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug testsuite/29674] [gdb/testsuite] Test-cases untested due to "missing .note.GNU-stack section implies executable stack"
2022-10-12 4:47 [Bug testsuite/29674] New: [gdb/testsuite] Test-cases untested due to "missing .note.GNU-stack section implies executable stack" vries at gcc dot gnu.org
2022-10-12 4:54 ` [Bug testsuite/29674] " vries at gcc dot gnu.org
@ 2022-10-12 15:52 ` vries at gcc dot gnu.org
2022-10-27 15:17 ` vries at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: vries at gcc dot gnu.org @ 2022-10-12 15:52 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29674
--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
https://sourceware.org/pipermail/gdb-patches/2022-October/192609.html
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug testsuite/29674] [gdb/testsuite] Test-cases untested due to "missing .note.GNU-stack section implies executable stack"
2022-10-12 4:47 [Bug testsuite/29674] New: [gdb/testsuite] Test-cases untested due to "missing .note.GNU-stack section implies executable stack" vries at gcc dot gnu.org
2022-10-12 4:54 ` [Bug testsuite/29674] " vries at gcc dot gnu.org
2022-10-12 15:52 ` vries at gcc dot gnu.org
@ 2022-10-27 15:17 ` vries at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: vries at gcc dot gnu.org @ 2022-10-27 15:17 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29674
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Target Milestone|--- |13.1
Status|NEW |RESOLVED
--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=0f2cd53cf4f730136e2b275e8279d8bc348a9a88
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-10-27 15:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-12 4:47 [Bug testsuite/29674] New: [gdb/testsuite] Test-cases untested due to "missing .note.GNU-stack section implies executable stack" vries at gcc dot gnu.org
2022-10-12 4:54 ` [Bug testsuite/29674] " vries at gcc dot gnu.org
2022-10-12 15:52 ` vries at gcc dot gnu.org
2022-10-27 15:17 ` 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).