summaryrefslogtreecommitdiff
path: root/gas/testsuite/gas/elf/section28.s
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2021-02-16 04:55:42 -0800
committerH.J. Lu <hjl.tools@gmail.com>2021-02-16 04:55:53 -0800
commitca1289b9f3b6c9854386d1373918978412a59f94 (patch)
tree108abbbfcc9936c592fd7fd0b0bec027434efc17 /gas/testsuite/gas/elf/section28.s
parent394ae71f026cf62beb30511da42c8198da90d82d (diff)
downloadbinutils-gdb-ca1289b9f3b6c9854386d1373918978412a59f94.tar.gz
gas: Allow SHF_GNU_RETAIN on all sections
Since SHF_GNU_RETAIN is allowed on all sections, strip SHF_GNU_RETAIN when checking incorrect section attributes. PR gas/27412 * config/obj-elf.c (obj_elf_change_section): Strip SHF_GNU_RETAIN when checking incorrect section attributes. * testsuite/gas/elf/elf.exp: Run section28 and section29. * testsuite/gas/elf/section28.d: New file. * testsuite/gas/elf/section28.s: Likewise. * testsuite/gas/elf/section29.d: Likewise. * testsuite/gas/elf/section29.s: Likewise.
Diffstat (limited to 'gas/testsuite/gas/elf/section28.s')
-rw-r--r--gas/testsuite/gas/elf/section28.s11
1 files changed, 11 insertions, 0 deletions
diff --git a/gas/testsuite/gas/elf/section28.s b/gas/testsuite/gas/elf/section28.s
new file mode 100644
index 00000000000..ebcf42c2e24
--- /dev/null
+++ b/gas/testsuite/gas/elf/section28.s
@@ -0,0 +1,11 @@
+ .section .note.Linux,"a"
+ .word 1
+
+ .section .note.Linux,"aR"
+ .word 1
+
+ .section .note.foo
+ .word 1
+
+ .section .note.foo,"R"
+ .word 1