mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 06:17:47 +08:00
Fix detection of missing plugin for LTO objects.
2019-08-16 Martin Liska <mliska@suse.cz> PR ld/24912 * elflink.c: Report error only for not relocatable. * linker.c (_bfd_generic_link_add_one_symbol): Do not handle here lto_slim_object as it's handled in caller. 2019-08-16 Martin Liska <mliska@suse.cz> PR ld/24912 * object.cc (big_endian>::do_layout): Do not report error, but only set a flag. (big_endian>::do_add_symbols): Report error only for when relocatable.
This commit is contained in:
24
bfd/linker.c
24
bfd/linker.c
@ -1421,24 +1421,12 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
|
||||
else if (bfd_is_com_section (section))
|
||||
{
|
||||
row = COMMON_ROW;
|
||||
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);
|
||||
}
|
||||
}
|
||||
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);
|
||||
}
|
||||
else
|
||||
row = DEF_ROW;
|
||||
|
Reference in New Issue
Block a user