[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/30281] error: multiple definition of `pwrite@GLIBC_2.2' wi
From: |
cvs-commit at gcc dot gnu.org |
Subject: |
[Bug binutils/30281] error: multiple definition of `pwrite@GLIBC_2.2' with LTO and symver attribute |
Date: |
Tue, 11 Apr 2023 16:30:21 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=30281
--- Comment #8 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot
gnu.org> ---
The binutils-2_40-branch branch has been updated by H.J. Lu
<hjl@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ded035f913e4d8c989880cf5928b6b5fca9466ae
commit ded035f913e4d8c989880cf5928b6b5fca9466ae
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Mar 29 13:06:26 2023 -0700
lto: Don't add indirect symbols for versioned aliases in IR
Linker adds indirect symbols for versioned symbol aliases, which are
created by ".symver foo, foo@FOO", by checking symbol type, value and
section so that references to foo will be replaced by references to
foo@FOO if foo and foo@FOO have the same symbol type, value and section.
But in IR, since all symbols of the same type have the same value and
section, we can't tell if a symbol is an alias of another symbol by
their types, values and sections. We shouldn't add indirect symbols
for versioned symbol aliases in IR.
bfd/
PR ld/30281
* elflink.c (elf_link_add_object_symbols): Don't add indirect
symbols for ".symver foo, foo@FOO" aliases in IR.
ld/
PR ld/30281
* testsuite/ld-plugin/lto.exp: Add PR ld/30281 test.
* testsuite/ld-plugin/pr30281.t: New file.
* testsuite/ld-plugin/pr30281.c: Likewise.
(cherry picked from commit 79cfb928f552401e3cec7a208a87eb74aa0d2d8b)
--
You are receiving this mail because:
You are on the CC list for the bug.