forked from Imagelibrary/binutils-gdb
Use the IR symbol table for the IR input object
ELF linker shouldn't skip the IR object when searching the symbol table of an archive element. If linker doesn't know if the object file is an IR object, it should give LTO plugin a chance to get the correct symbol table and use the IR symbol table if the input is an IR object. bfd/ PR ld/18250 PR ld/20267 * elflink.c: Include plugin.h if BFD_SUPPORTS_PLUGINS is defined. (elf_link_is_defined_archive_symbol): Call bfd_link_plugin_object_p on unknown plugin object and use the IR symbol table if the input is an IR object. * plugin.c (bfd_link_plugin_object_p): New function. * plugin.h (bfd_link_plugin_object_p): New prototype. ld/ PR ld/20267 * testsuite/ld-plugin/lto.exp (lto_link_tests): Add test for PR ld/20267. (lto_run_tests): Likewise. * testsuite/ld-plugin/pr20267a.c: New file. * testsuite/ld-plugin/pr20267b.c: Likewise.
This commit is contained in:
@@ -27,6 +27,7 @@ void bfd_plugin_set_program_name (const char *);
|
||||
void bfd_plugin_set_plugin (const char *);
|
||||
bfd_boolean bfd_plugin_target_p (const bfd_target *);
|
||||
bfd_boolean bfd_plugin_specified_p (void);
|
||||
bfd_boolean bfd_link_plugin_object_p (bfd *);
|
||||
void register_ld_plugin_object_p (const bfd_target *(*object_p) (bfd *));
|
||||
|
||||
typedef struct plugin_data_struct
|
||||
|
||||
Reference in New Issue
Block a user