From 0f2cd53cf4f730136e2b275e8279d8bc348a9a88 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Tue, 25 Oct 2022 14:14:34 +0200 Subject: [gdb/testsuite] Handle missing .note.GNU-stack On openSUSE Tumbleweed I run into this for the dwarf assembly test-cases, and some hardcoded assembly test-cases: ... Running gdb.dwarf2/fission-absolute-dwo.exp ... gdb compile failed, ld: warning: fission-absolute-dwo.o: \ missing .note.GNU-stack section implies executable stack ld: NOTE: This behaviour is deprecated and will be removed in a future \ version of the linker === gdb Summary === # of untested testcases 1 ... Fix the dwarf assembly test-cases by adding the missing .note.GNU-stack in proc Dwarf::assemble. Fix the hard-coded test-cases using this command: ... $ for f in $(find gdb/testsuite/gdb.* -name *.S); do if ! grep -q note.GNU-stack $f; then echo -e "\t.section\t.note.GNU-stack,\"\",@progbits" >> $f; fi; done ... Likewise for .s files, and gdb/testsuite/lib/my-syscalls.S. The idiom for arm seems to be to use %progbits instead, see commit 9a5911c08be ("gdb/testsuite/gdb.dwarf2: Replace @ with % for ARM compatability"), so hand-edit gdb/testsuite/gdb.arch/arm-disp-step.S to use %progbits instead. Note that dwarf assembly testcases use %progbits as decided by proc _section. Tested on x86_64-linux. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29674 --- gdb/testsuite/gdb.dwarf2/dw2-basic.S | 1 + 1 file changed, 1 insertion(+) (limited to 'gdb/testsuite/gdb.dwarf2/dw2-basic.S') diff --git a/gdb/testsuite/gdb.dwarf2/dw2-basic.S b/gdb/testsuite/gdb.dwarf2/dw2-basic.S index 93eba20..9be8b99 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-basic.S +++ b/gdb/testsuite/gdb.dwarf2/dw2-basic.S @@ -197,3 +197,4 @@ func_cu1: .byte 1 .Lline1_end: + .section .note.GNU-stack,"",@progbits -- cgit v1.1