diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-07-22 03:49:07 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-07-22 03:49:17 -0700 |
commit | 0e6a3f07f50723d1831291492b96fdf74bcbdc11 (patch) | |
tree | a4b39ecfd8c04d2836ef2e5620e5e2169d65572c /include | |
parent | 1ad2776d3db6d82cb59cef1495642fc7fcd57ed5 (diff) | |
download | fsf-binutils-gdb-0e6a3f07f50723d1831291492b96fdf74bcbdc11.zip fsf-binutils-gdb-0e6a3f07f50723d1831291492b96fdf74bcbdc11.tar.gz fsf-binutils-gdb-0e6a3f07f50723d1831291492b96fdf74bcbdc11.tar.bz2 |
ld: Properly override the IR definition
We change the previous definition in the IR object to undefweak only
after all LTO symbols have been read.
include/
PR ld/26262
PR ld/26267
* bfdlink.h (bfd_link_info): Add lto_all_symbols_read.
ld/
PR ld/26262
PR ld/26267
* ldlang.c (lang_process): Set lto_all_symbols_read after all
LTO IR symbols have been read.
* plugin.c (plugin_notice): Override the IR definition only if
all LTO IR symbols have been read or the new definition is
non-weak and the the IR definition is weak
* testsuite/ld-plugin/lto.exp: Run PR ld/26262 and ld/26267
tests.
* testsuite/ld-plugin/pr26262a.c: New file.
* testsuite/ld-plugin/pr26262b.c: Likewise.
* testsuite/ld-plugin/pr26262c.c: Likewise.
* testsuite/ld-plugin/pr26267.err: Likewise.
* testsuite/ld-plugin/pr26267a.c: Likewise.
* testsuite/ld-plugin/pr26267b.c: Likewise.
* testsuite/ld-plugin/pr26267c.c: Likewise.
Diffstat (limited to 'include')
-rw-r--r-- | include/ChangeLog | 6 | ||||
-rw-r--r-- | include/bfdlink.h | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index 6a69a74..211d545 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,9 @@ +2020-07-22 H.J. Lu <hongjiu.lu@intel.com> + + PR ld/26262 + PR ld/26267 + * bfdlink.h (bfd_link_info): Add lto_all_symbols_read. + 2020-07-11 H.J. Lu <hongjiu.lu@intel.com> * elf/common.h (GNU_PROPERTY_X86_FEATURE_2_TMM): New. diff --git a/include/bfdlink.h b/include/bfdlink.h index 7163433..3badfbdb 100644 --- a/include/bfdlink.h +++ b/include/bfdlink.h @@ -361,6 +361,9 @@ struct bfd_link_info /* TRUE if the LTO plugin is active. */ unsigned int lto_plugin_active: 1; + /* TRUE if all LTO IR symbols have been read. */ + unsigned int lto_all_symbols_read : 1; + /* TRUE if global symbols in discarded sections should be stripped. */ unsigned int strip_discarded: 1; |