[all-commits] [llvm/llvm-project] 143133: [LLD] [COFF] Don't preserve unnecessary __imp_ pre...
Martin Storsjö via All-commits
all-commits at lists.llvm.org
Mon Dec 4 13:38:59 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 143133fe685bd0b8819a96bdc1af6a4ff2877b13
https://github.com/llvm/llvm-project/commit/143133fe685bd0b8819a96bdc1af6a4ff2877b13
Author: Martin Storsjö <martin at martin.st>
Date: 2023-12-04 (Mon, 04 Dec 2023)
Changed paths:
M lld/COFF/InputFiles.cpp
M lld/test/COFF/lto-imp-prefix.ll
Log Message:
-----------
[LLD] [COFF] Don't preserve unnecessary __imp_ prefixed symbols (#72989)
This redoes the fix from 3ab6209a3f93bdbeec8e9b9fcc00a9a4980915ff
differently, without the unwanted effect of preserving unnecessary
`__imp_` prefixed symbols.
If the referencing object is a regular object, the `__imp_` symbol will
have `isUsedInRegularObj` set on it from that already. If the
referencing object is an LTO object, we set `isUsedInRegularObj` for any
symbol starting with `__imp_`.
If the object file defining the `__imp_` symbol is a regular object, the
`isUsedInRegularObj` flag has no effect. If it is an LTO object, it
causes the symbol to be preserved.
More information about the All-commits
mailing list