[all-commits] [llvm/llvm-project] ac2224: [ELF] --exclude-libs: localize defined libcall sym...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Mon Jan 11 09:33:42 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ac2224c02282039f41294842396cbbe47ea29a23
https://github.com/llvm/llvm-project/commit/ac2224c02282039f41294842396cbbe47ea29a23
Author: Fangrui Song <i at maskray.me>
Date: 2021-01-11 (Mon, 11 Jan 2021)
Changed paths:
M lld/ELF/Driver.cpp
A lld/test/ELF/lto/exclude-libs-libcall.ll
Log Message:
-----------
[ELF] --exclude-libs: localize defined libcall symbols referenced by lto.tmp
Fixes PR48681: after LTO, lto.tmp may reference a libcall symbol not in an IR
symbol table of any bitcode file. If such a symbol is defined in an archive
matched by a --exclude-libs, we don't correctly localize the symbol.
Add another `excludeLibs` after `compileBitcodeFiles` to localize such libcall
symbols. Unfortunately we have keep the existing one for D43126.
Using VER_NDX_LOCAL is an implementation detail of `--exclude-libs`, it does not
necessarily tie to the "localize" behavior. `local:` patterns in a version
script can be omitted.
The `symbol ... has undefined version ...` error should not be exempted.
Ideally we should error as GNU ld does. https://issuetracker.google.com/issues/73020933
Reviewed By: psmith
Differential Revision: https://reviews.llvm.org/D94280
More information about the All-commits
mailing list