gas: Allow SHF_GNU_RETAIN on all sections
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 16 Feb 2021 12:55:42 +0000 (04:55 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 16 Feb 2021 12:55:53 +0000 (04:55 -0800)
commitca1289b9f3b6c9854386d1373918978412a59f94
tree108abbbfcc9936c592fd7fd0b0bec027434efc17
parent394ae71f026cf62beb30511da42c8198da90d82d
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.
gas/ChangeLog
gas/config/obj-elf.c
gas/testsuite/gas/elf/elf.exp
gas/testsuite/gas/elf/section28.d [new file with mode: 0644]
gas/testsuite/gas/elf/section28.s [new file with mode: 0644]
gas/testsuite/gas/elf/section29.d [new file with mode: 0644]
gas/testsuite/gas/elf/section29.s [new file with mode: 0644]