[PATCH] Introduce new .text.sorted.* sections.
Martin Liška
mliska@suse.cz
Tue Sep 24 12:05:00 GMT 2019
Hi.
Aim of the patch is to introduce a new .text subsection that
will be sorted by default. That can be leveraged in LTO where we
want to provide a specific sorting of symbols in a binary.
For more information about IPA reorder, please take a look:
https://gcc.gnu.org/ml/gcc-patches/2019-09/msg01142.html
Ready to be installed?
Thanks,
Martin
gold/ChangeLog:
2019-09-24 Martin Liska <mliska@suse.cz>
* layout.cc (Layout::special_ordering_of_input_section):
Return index for .text.sorted.* sections.
* testsuite/section_sorting_name.cc: Cover also .text.sorted
subsections.
* testsuite/section_sorting_name.sh: Likewise.
ld/ChangeLog:
2019-09-24 Martin Liska <mliska@suse.cz>
* scripttempl/arclinux.sc: Add .text.sorted.* which is sorted
by default.
* scripttempl/elf.sc: Likewise.
* scripttempl/elf64bpf.sc: Likewise.
* scripttempl/nds32elf.sc: Likewise.
* testsuite/ld-arm/arm-no-rel-plt.ld: Expect .text.sorted.*
in the default linker script.
* testsuite/ld-arm/fdpic-main.ld: Likewise.
* testsuite/ld-arm/fdpic-shared.ld: Likewise.
---
gold/layout.cc | 9 ++++++---
gold/testsuite/section_sorting_name.cc | 22 ++++++++++++++++++++++
gold/testsuite/section_sorting_name.sh | 3 +++
ld/scripttempl/arclinux.sc | 1 +
ld/scripttempl/elf.sc | 1 +
ld/scripttempl/elf64bpf.sc | 1 +
ld/scripttempl/nds32elf.sc | 1 +
ld/testsuite/ld-arm/arm-no-rel-plt.ld | 1 +
ld/testsuite/ld-arm/fdpic-main.ld | 1 +
ld/testsuite/ld-arm/fdpic-shared.ld | 1 +
10 files changed, 38 insertions(+), 3 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Introduce-new-.text.sorted.-sections.patch
Type: text/x-patch
Size: 5603 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20190924/6f6a0780/attachment.bin>
More information about the Binutils
mailing list