[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/23499] Incorrect code in bfd_elf_record_link_assignment
From: |
cvs-commit at gcc dot gnu.org |
Subject: |
[Bug ld/23499] Incorrect code in bfd_elf_record_link_assignment |
Date: |
Fri, 10 Aug 2018 19:23:04 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=23499
--- Comment #3 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 <address@hidden>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=48e30f5238c70e738f44474d595c476ef4e4ec38
commit 48e30f5238c70e738f44474d595c476ef4e4ec38
Author: H.J. Lu <address@hidden>
Date: Fri Aug 10 12:21:58 2018 -0700
Always clear h->verinfo.verdef when overriding a dynamic definition
When linker defines a symbol to override a dynamic definition, it should
always clear h->verinfo.verdef so that the symbol won't be associated
with the version information from the dynamic object. This happened to
the symbol "_edata" when creating an unversioned dynamic object linking
against:
1. libKF5ConfigCore.so.5.49.0
2. libKF5CoreAddons.so.5.49.0
3. libKF5I18n.so.5.49.0
4. libKF5DBusAddons.so.5.49.0
5. libQt5Xml.so.5.11.1
6. libQt5DBus.so.5.11.1
7. libQt5Core.so.5.11.1
Among them
libQt5Xml.so.5.11.1
299: 000000000003e000 0 NOTYPE GLOBAL DEFAULT 18 _edata@@Qt_5
libQt5DBus.so.5.11.1
597: 0000000000092018 0 NOTYPE GLOBAL DEFAULT 18 _edata@@Qt_5
libQt5Core.so.5.11.1
2292: 00000000004df640 0 NOTYPE GLOBAL DEFAULT 21 address@hidden
2293: 00000000004df640 0 NOTYPE GLOBAL DEFAULT 21 address@hidden
The problem is triggered by 2 duplicated entries of address@hidden in
libQt5Core.so.5.11.1 which was created by gold. Before this commit,
ld created the dynamic object with "_edata" in its dynamic symbol table
which was linker defined and associated with the version information
from libQt5Core.so.5.11.1. The code in question was there when the
binutils source was imported to sourceware.org. When such a dynamic
object was used later, we got:
/usr/bin/ld: bin/libKF5Service.so.5.49.0: _edata: invalid version 21 (max
0)
/usr/bin/ld: bin/libKF5Service.so.5.49.0: error adding symbols: bad value
Tested with many ELF targets.
PR ld/23499
* elflink.c (bfd_elf_record_link_assignment): Always clear
h->verinfo.verdef when overriding a dynamic definition.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/23499] New: Incorrect code in bfd_elf_record_link_assignment, hjl.tools at gmail dot com, 2018/08/09
- [Bug ld/23499] Incorrect code in bfd_elf_record_link_assignment, hjl.tools at gmail dot com, 2018/08/09
- [Bug ld/23499] Incorrect code in bfd_elf_record_link_assignment, arekm at maven dot pl, 2018/08/09
- [Bug ld/23499] Incorrect code in bfd_elf_record_link_assignment, hjl.tools at gmail dot com, 2018/08/09
- [Bug ld/23499] Incorrect code in bfd_elf_record_link_assignment,
cvs-commit at gcc dot gnu.org <=
- [Bug ld/23499] Incorrect code in bfd_elf_record_link_assignment, cvs-commit at gcc dot gnu.org, 2018/08/25
- [Bug ld/23499] Incorrect code in bfd_elf_record_link_assignment, hjl.tools at gmail dot com, 2018/08/25