diff options
author | Nick Clifton <nickc@redhat.com> | 2020-10-05 10:40:07 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2020-10-05 10:40:07 +0100 |
commit | b71702f1c01052b70b4fd8157982eadc2132fc24 (patch) | |
tree | 55fbf234a5e3fc887375ce3c3bcec983dce38417 /gas/doc | |
parent | 1ba0655539bcbde49171691582d5e804c3e4f975 (diff) | |
download | gdb-b71702f1c01052b70b4fd8157982eadc2132fc24.zip gdb-b71702f1c01052b70b4fd8157982eadc2132fc24.tar.gz gdb-b71702f1c01052b70b4fd8157982eadc2132fc24.tar.bz2 |
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.
Diffstat (limited to 'gas/doc')
-rw-r--r-- | gas/doc/as.texi | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gas/doc/as.texi b/gas/doc/as.texi index c0baa94..2ba101c 100644 --- a/gas/doc/as.texi +++ b/gas/doc/as.texi @@ -6728,11 +6728,14 @@ If @var{flags} contains the @code{o} flag, then the @var{type} argument must be present along with an additional field like this: @smallexample -.section @var{name},"@var{flags}"o,@@@var{type},@var{SymbolName} +.section @var{name},"@var{flags}"o,@@@var{type},@var{SymbolName}|@var{SectionIndex} @end smallexample The @var{SymbolName} field specifies the symbol name which the section -references. +references. Alternatively a numeric @var{SectionIndex} can be provided. This +is not generally a good idea as section indicies are rarely known at assembly +time, but the facility is provided for testing purposes. An index of zero is +allowed. It indicates that the linked-to section has already been discarded. Note: If both the @var{M} and @var{o} flags are present, then the fields for the Merge flag should come first, like this: |