diff options
author | Tom de Vries <tdevries@suse.de> | 2022-10-25 14:14:34 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2022-10-25 14:14:34 +0200 |
commit | 0f2cd53cf4f730136e2b275e8279d8bc348a9a88 (patch) | |
tree | f7775e58ca7ef93377015832ca65a28690d05712 /gdb/testsuite/gdb.disasm/t10_and.s | |
parent | 4ff322b6fa699e352730f58a0a1e90c09274b0f6 (diff) | |
download | gdb-0f2cd53cf4f730136e2b275e8279d8bc348a9a88.zip gdb-0f2cd53cf4f730136e2b275e8279d8bc348a9a88.tar.gz gdb-0f2cd53cf4f730136e2b275e8279d8bc348a9a88.tar.bz2 |
[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
Diffstat (limited to 'gdb/testsuite/gdb.disasm/t10_and.s')
-rw-r--r-- | gdb/testsuite/gdb.disasm/t10_and.s | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.disasm/t10_and.s b/gdb/testsuite/gdb.disasm/t10_and.s index 0459c10..457b67e 100644 --- a/gdb/testsuite/gdb.disasm/t10_and.s +++ b/gdb/testsuite/gdb.disasm/t10_and.s @@ -970,3 +970,4 @@ _start: and.l @0x12345678:32,@0x9abcdef0:32 ;01046b2c1234567848609abcdef0 .end + .section .note.GNU-stack,"",@progbits |