aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopUtils.cpp
diff options
context:
space:
mode:
authorTomohiro Kashiwada <kikairoya@gmail.com>2025-09-09 19:10:28 +0900
committerGitHub <noreply@github.com>2025-09-09 13:10:28 +0300
commite976622e2d7464b09fcf0141291003bf5fe9fd6f (patch)
treed283c833eb33ca239cc9541c7f7411ce35d079d3 /llvm/lib/Transforms/Utils/LoopUtils.cpp
parenta0b8d548fd250c92c8f9274b57e38ad3f0b215e9 (diff)
downloadllvm-e976622e2d7464b09fcf0141291003bf5fe9fd6f.zip
llvm-e976622e2d7464b09fcf0141291003bf5fe9fd6f.tar.gz
llvm-e976622e2d7464b09fcf0141291003bf5fe9fd6f.tar.bz2
[LLD][COFF] Prevent to emit relocations for discarded weak wrapped symbols (#156214)
When a symbol is imported from a DLL, a base relocation record is normally emitted. However, if the import is pulled in via a wrapped symbol (using `--wrap`) and later dropped because it is only referenced weakly, a dangling base relocation remains in the output. At runtime, this relocation changes the symbol value from null to a garbage pointer. This patch adds checks to avoid emitting relocation records for non-`Defined` symbols, and to prevent creating an auto-import entry if an import entry for the wrapped symbol already exists. Fixes https://github.com/llvm/llvm-project/issues/150739
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUtils.cpp')
0 files changed, 0 insertions, 0 deletions