|
From: | cvs-commit at gcc dot gnu.org |
Subject: | [Bug ld/26262] ld/plugin.c:plugin_notice may incorrectly replace an LTO bfd_link_hash_defined with bfd_link_hash_undefweak |
Date: | Wed, 22 Jul 2020 10:59:14 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=26262 --- Comment #7 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by H.J. Lu <hjl@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0e6a3f07f50723d1831291492b96fdf74bcbdc11 commit 0e6a3f07f50723d1831291492b96fdf74bcbdc11 Author: H.J. Lu <hjl.tools@gmail.com> 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 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. -- You are receiving this mail because: You are on the CC list for the bug.
[Prev in Thread] | Current Thread | [Next in Thread] |