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.
(cherry picked from commit 0e6a3f07f50723d1831291492b96fdf74bcbdc11)
The binutils- 2_35-branch branch has been updated by H.J. Lu <email address hidden>:
https:/ /sourceware. org/git/ gitweb. cgi?p=binutils- gdb.git; h=041d1c2d4f03a 134cb7574e4d62d 2ce4418503ff
commit 041d1c2d4f03a13 4cb7574e4d62d2c e4418503ff
Author: H.J. Lu <email address hidden>
Date: Wed Jul 22 03:49:07 2020 -0700
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 symbols_ read.
PR ld/26267
* bfdlink.h (bfd_link_info): Add lto_all_
ld/
PR ld/26262 symbols_ read after all
non- weak and the the IR definition is weak ld-plugin/ lto.exp: Run PR ld/26262 and ld/26267 ld-plugin/ pr26262a. c: New file. ld-plugin/ pr26262b. c: Likewise. ld-plugin/ pr26262c. c: Likewise. ld-plugin/ pr26267. err: Likewise. ld-plugin/ pr26267a. c: Likewise. ld-plugin/ pr26267b. c: Likewise. ld-plugin/ pr26267c. c: Likewise.
PR ld/26267
* ldlang.c (lang_process): Set lto_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
* testsuite/
tests.
* testsuite/
* testsuite/
* testsuite/
* testsuite/
* testsuite/
* testsuite/
* testsuite/
(cherry picked from commit 0e6a3f07f50723d 1831291492b96fd f74bcbdc11)