[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/32083] lto1: fatal error: multiple prevailing defs for ‘func’
From: |
cvs-commit at gcc dot gnu.org |
Subject: |
[Bug ld/32083] lto1: fatal error: multiple prevailing defs for ‘func’ |
Date: |
Thu, 15 Aug 2024 10:57:26 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=32083
--- Comment #3 from Sourceware Commits <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=a6f8fe0a9e9cbe871652e46ba7c22d5e9fb86208
commit a6f8fe0a9e9cbe871652e46ba7c22d5e9fb86208
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Aug 14 20:50:02 2024 -0700
lto: Don't include unused LTO archive members in output
When plugin_object_p is called by elf_link_is_defined_archive_symbol to
check if a symbol in archive is a real definition, set archive member
plugin_format to bfd_plugin_yes_unused to avoid including the unused LTO
archive members in linker output. When plugin_object_p is called as
known used, call plugin claim_file if plugin_format is bfd_plugin_unknown
or bfd_plugin_yes_unused.
To get the proper support for archives with LTO common symbols with GCC,
the GCC fix for
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116361
is needed.
bfd/
PR ld/32083
* archures.c (bfd_arch_get_compatible): Treat bfd_plugin_yes_unused
the same as bfd_plugin_yes.
* elflink.c (elf_link_is_defined_archive_symbol): Likewise.
* bfd.c (bfd_plugin_format): Add bfd_plugin_yes_unused.
* plugin.c (try_claim): Try claim_file_v2 first.
* bfd-in2.h: Regenerated.
ld/
PR ld/32083
* plugin.c (plugin_call_claim_file): Add an argument to return
if LDPT_REGISTER_CLAIM_FILE_HOOK_V2 is used.
(plugin_object_p): When KNOWN_USED is false, we call plugin
claim_file if plugin_format is bfd_plugin_unknown and set
plugin_format to bfd_plugin_yes_unused on LTO object. When
KNOWN_USED is true, we call plugin claim_file if plugin_format
is bfd_plugin_unknown or bfd_plugin_yes_unused.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/32083] New: lto1: fatal error: multiple prevailing defs for ‘func’, hjl.tools at gmail dot com, 2024/08/14
- [Bug ld/32083] lto1: fatal error: multiple prevailing defs for ‘func’, sam at gentoo dot org, 2024/08/14
- [Bug ld/32083] lto1: fatal error: multiple prevailing defs for ‘func’, hjl.tools at gmail dot com, 2024/08/14
- [Bug ld/32083] lto1: fatal error: multiple prevailing defs for ‘func’, hjl.tools at gmail dot com, 2024/08/14
- [Bug ld/32083] lto1: fatal error: multiple prevailing defs for ‘func’,
cvs-commit at gcc dot gnu.org <=
- [Bug ld/32083] lto1: fatal error: multiple prevailing defs for ‘func’, cvs-commit at gcc dot gnu.org, 2024/08/15
- [Bug ld/32083] lto1: fatal error: multiple prevailing defs for ‘func’, cvs-commit at gcc dot gnu.org, 2024/08/22
- [Bug ld/32083] lto1: fatal error: multiple prevailing defs for ‘func’, hjl.tools at gmail dot com, 2024/08/22
- [Bug ld/32083] lto1: fatal error: multiple prevailing defs for ‘func’, cvs-commit at gcc dot gnu.org, 2024/08/22