Summary: | Support SHF_LINK_ORDER with sh_link=0 | ||
---|---|---|---|
Product: | binutils | Reporter: | Fangrui Song <i> |
Component: | gas | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | nickc |
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: | ||
Attachments: | Proposed patch |
Description
Fangrui Song
2020-07-16 23:14:15 UTC
Update: https://reviews.llvm.org/D72904 added the .section .meta,"ao",@progbits,0 syntax to LLVM's integrated assembler (target: 12.0.0) Created attachment 12886 [details]
Proposed patch
Hi Fangrui,
Please could you try out the attached patch and see if it does what you
expect.
Cheers
Nick
(In reply to Nick Clifton from comment #2) > Created attachment 12886 [details] > Proposed patch > > Hi Fangrui, > > Please could you try out the attached patch and see if it does what you > expect. > > Cheers > Nick Thanks, Nick! I have tested it on Linux x86-64. LLVM's integrated assembler hard codes 0 but I think supporting other numerical indexes is fine. The master branch has been updated by Nick Clifton <nickc@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b71702f1c01052b70b4fd8157982eadc2132fc24 commit b71702f1c01052b70b4fd8157982eadc2132fc24 Author: Nick Clifton <nickc@redhat.com> Date: Mon Oct 5 10:40:07 2020 +0100 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. (In reply to Fangrui Song from comment #3) > LLVM's integrated assembler hard codes 0 but I think supporting other > numerical indexes is fine. Yeah - I doubt if the new feature will ever be used to set an index other than zero, but I could not think of a good reason to prevent other numbers from being accepted. Patch applied. |