public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug testsuite/29674] New: [gdb/testsuite] Test-cases untested due to "missing .note.GNU-stack section implies executable stack" Date: Wed, 12 Oct 2022 04:47:10 +0000 [thread overview] Message-ID: <bug-29674-4717@http.sourceware.org/bugzilla/> (raw) 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.
next reply other threads:[~2022-10-12 4:47 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-10-12 4:47 vries at gcc dot gnu.org [this message] 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-29674-4717@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).