From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4D2FE3856DE0; Wed, 12 Oct 2022 04:47:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4D2FE3856DE0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1665550031; bh=j4ihkCvh+p6e5Bh8ximMbGkFoz1YA5jEGFLWV4Udh8w=; h=From:To:Subject:Date:From; b=r18nk/Slkla+6AbMDV1QgULNNeBIFmZE5mk+9L0ltz7/C1SdYsHqbvXi/af/5Airg 6GMveNzWXfpTt5KhD/2w+dd6wG5ETY8LNzjKoQQaSp5/sNO/2Cr9PwfNCEGWZHkgJB 5dcB0w0mbIXiVmhzFs7vlH7Kfz1+DAtv8wJAQqTg= From: "vries at gcc dot gnu.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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: testsuite X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29674 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-absolut= e-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/fissi= on-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: N= OTE: This behaviour is deprecated and will be removed in a future version of the linker =3D=3D=3D gdb Summary =3D=3D=3D # 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=3D-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 t= his (so, at least all the tests that use dwarf assembly) with this addition. Looking at: ... $ echo | gcc -x c - -S -o- .file "" .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. --=20 You are receiving this mail because: You are on the CC list for the bug.=