[all-commits] [llvm/llvm-project] c7cf96: [ELF] Set the priority of STB_GNU_UNIQUE the same ...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Mon Mar 14 12:00:28 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c7cf960d859bcfe166860fc1c4eba9665693ad51
https://github.com/llvm/llvm-project/commit/c7cf960d859bcfe166860fc1c4eba9665693ad51
Author: Fangrui Song <i at maskray.me>
Date: 2022-03-14 (Mon, 14 Mar 2022)
Changed paths:
M lld/ELF/Symbols.cpp
M lld/ELF/Symbols.h
A lld/test/ELF/comdat-binding.s
Log Message:
-----------
[ELF] Set the priority of STB_GNU_UNIQUE the same as STB_WEAK
In GCC -fgnu-unique output, STB_GNU_UNIQUE symbols are always defined relative
to a section in a COMDAT group. Currently `other` cannot be STB_GNU_UNIQUE for
valid input, so this patch is NFC.
If we switch to the model that ignores COMDAT resolution when performing symbol
resolution (D120626), this will fix bogus `relocation refers to a symbol in a
discarded section` errors when mixing -fno-gnu-unique objects with -fgnu-unique
objects.
Differential Revision: https://reviews.llvm.org/D120640
More information about the All-commits
mailing list