forked from Imagelibrary/binutils-gdb
Support .gnu.lto_.lto section in ELF files (PR 24768).
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.
This commit is contained in:
24
bfd/linker.c
24
bfd/linker.c
@@ -1421,12 +1421,24 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
|
||||
else if (bfd_is_com_section (section))
|
||||
{
|
||||
row = COMMON_ROW;
|
||||
if (!bfd_link_relocatable (info)
|
||||
&& name[0] == '_'
|
||||
&& name[1] == '_'
|
||||
&& strcmp (name + (name[2] == '_'), "__gnu_lto_slim") == 0)
|
||||
_bfd_error_handler
|
||||
(_("%pB: plugin needed to handle lto object"), abfd);
|
||||
static bfd_boolean report_plugin_err = TRUE;
|
||||
if (!bfd_link_relocatable (info) && report_plugin_err)
|
||||
{
|
||||
if (abfd->lto_slim_object)
|
||||
{
|
||||
report_plugin_err = FALSE;
|
||||
_bfd_error_handler
|
||||
(_("%pB: plugin needed to handle lto object"), abfd);
|
||||
}
|
||||
else if (name[0] == '_'
|
||||
&& name[1] == '_'
|
||||
&& strcmp (name + (name[2] == '_'), "__gnu_lto_slim") == 0)
|
||||
{
|
||||
report_plugin_err = FALSE;
|
||||
_bfd_error_handler
|
||||
(_("%pB: plugin needed to handle lto object"), abfd);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
row = DEF_ROW;
|
||||
|
||||
Reference in New Issue
Block a user