[PATCH] Support .gnu.lto_.lto section in ELF files (PR 24768).
Martin Liška
mliska@suse.cz
Mon Jul 22 14:01:00 GMT 2019
Hi.
The patch adds detection of a new LTO ELF section that will eventually
replace presence of the __gnu_lto_slim symbol detection. So, first I would
like to teach binutils about the section and later then (after some years),
detection based on __gnu_lto_slim symbol can be removed.
Ready for trunk?
Thanks,
Martin
bfd/ChangeLog:
2019-07-22 Martin Liska <mliska@suse.cz>
PR 24768
* archive.c (_bfd_compute_and_write_armap): Come up with
report_plugin_err variable.
* bfd-in2.h (struct bfd): Add lto_slim_object flag.
* elf.c (struct lto_section): New.
(_bfd_elf_make_section_from_shdr): Parse content of
.gnu_lto_.lto section.
* elflink.c: Report error for a missing LTO plugin.
* linker.c (_bfd_generic_link_add_one_symbol): Likewise.
binutils/ChangeLog:
2019-07-22 Martin Liska <mliska@suse.cz>
PR 24768
* nm.c (filter_symbols): Set report_plugin_err if
error is reported.
(display_rel_file): Report error for a missing LTO plugin.
gold/ChangeLog:
2019-07-22 Martin Liska <mliska@suse.cz>
PR 24768
* layout.h (class Layout): Add is_lto_slim_object and
set_lto_slim_object.
* object.cc (struct lto_section): Add lto_slim_object_.
(big_endian>::do_layout): Parse content of
.gnu_lto_.lto section.
(big_endian>::do_add_symbols): Report error for a missing
LTO plugin.
---
bfd/archive.c | 21 +++++++++++++++++----
bfd/bfd-in2.h | 3 +++
bfd/elf.c | 23 +++++++++++++++++++++++
bfd/elflink.c | 6 ++++++
bfd/linker.c | 24 ++++++++++++++++++------
binutils/nm.c | 23 ++++++++++++++++++++---
gold/layout.h | 10 ++++++++++
gold/object.cc | 31 ++++++++++++++++++++++++++++++-
8 files changed, 127 insertions(+), 14 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Support-.gnu.lto_.lto-section-in-ELF-files-PR-24768.patch
Type: text/x-patch
Size: 9339 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20190722/6c324261/attachment.bin>
More information about the Binutils
mailing list