]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - bfd/elf.c
GAS: Update the .section directive so that a numeric section index can be provided...
authorNick Clifton <nickc@redhat.com>
Mon, 5 Oct 2020 09:40:07 +0000 (10:40 +0100)
committerNick Clifton <nickc@redhat.com>
Mon, 5 Oct 2020 09:40:07 +0000 (10:40 +0100)
commitb71702f1c01052b70b4fd8157982eadc2132fc24
tree55fbf234a5e3fc887375ce3c3bcec983dce38417
parent1ba0655539bcbde49171691582d5e804c3e4f975
GAS: Update the .section directive so that a numeric section index can be provided when the "o" flag is used.

PR 26253
gas * config/obj-elf.c (obj_elf_section): Accept a numeric value for
the "o" section flag.  Interpret it as a section index.  Allow an
index of zero.
* doc/as.texi: Document the new behaviour.
* NEWS: Mention the new feature.  Tidy entries.
* testsuite/gas/elf/sh-link-zero.s: New test.
* testsuite/gas/elf/sh-link-zero.d: New test driver.
* testsuite/gas/elf/elf.exp: Run the new test.
* testsuite/gas/elf/section21.l: Updated expected assembler
output.

bfd * elf.c (_bfd_elf_setup_sections): Do not complain about an
sh_link value of zero when the SLF_LINK_ORDER flag is set.
(assign_section_numbers): Likewise.
bfd/ChangeLog
bfd/elf.c
gas/ChangeLog
gas/NEWS
gas/config/obj-elf.c
gas/config/obj-elf.h
gas/doc/as.texi
gas/testsuite/gas/elf/elf.exp
gas/testsuite/gas/elf/section21.l
gas/testsuite/gas/elf/sh-link-zero.d [new file with mode: 0644]
gas/testsuite/gas/elf/sh-link-zero.s [new file with mode: 0644]