https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116361
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by H.J. Lu <h...@gcc.gnu.org>: https://gcc.gnu.org/g:a98dd536b1017c2b814a3465206c6c01b2890998 commit r15-3088-ga98dd536b1017c2b814a3465206c6c01b2890998 Author: H.J. Lu <hjl.to...@gmail.com> Date: Wed Aug 21 07:25:25 2024 -0700 Update LDPT_REGISTER_CLAIM_FILE_HOOK_V2 linker plugin hook This hook allows the BFD linker plugin to distinguish calls to claim_file_handler that know the object is being used by the linker (from ldmain.c:add_archive_element), from calls that don't know it's being used by the linker (from elf_link_is_defined_archive_symbol); in the latter case, the plugin should avoid including the unused LTO archive members in link output. To get the proper support for archives with LTO common symbols, the linker fix commit a6f8fe0a9e9cbe871652e46ba7c22d5e9fb86208 Author: H.J. Lu <hjl.to...@gmail.com> Date: Wed Aug 14 20:50:02 2024 -0700 lto: Don't include unused LTO archive members in output is required. PR lto/116361 * lto-plugin.c (claim_file_handler_v2): Rename claimed to can_be_claimed. Include the LTO object only if it is known to be included in link output. Signed-off-by: H.J. Lu <hjl.to...@gmail.com>