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.arch/arc-analyze-prologue.S | |
parent | 4ff322b6fa699e352730f58a0a1e90c09274b0f6 (diff) | |
download | binutils-gdb-0f2cd53cf4f730136e2b275e8279d8bc348a9a88.tar.gz |
[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.arch/arc-analyze-prologue.S')
-rw-r--r-- | gdb/testsuite/gdb.arch/arc-analyze-prologue.S | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.arch/arc-analyze-prologue.S b/gdb/testsuite/gdb.arch/arc-analyze-prologue.S index de6973f905c..ae7b71e7572 100644 --- a/gdb/testsuite/gdb.arch/arc-analyze-prologue.S +++ b/gdb/testsuite/gdb.arch/arc-analyze-prologue.S @@ -901,3 +901,4 @@ main: j_s [blink] .align 4 + .section .note.GNU-stack,"",@progbits |