aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2025-01-21 23:55:41 +0200
committerGitHub <noreply@github.com>2025-01-21 23:55:41 +0200
commit9457418e66766d8fafc81f85eb8045986220ca3e (patch)
tree0b4c71442a96234cccd55967302e6e68808935c7 /llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp
parentc59ede638f48a80644ba0a6de0573d541fc05bbc (diff)
downloadllvm-9457418e66766d8fafc81f85eb8045986220ca3e.zip
llvm-9457418e66766d8fafc81f85eb8045986220ca3e.tar.gz
llvm-9457418e66766d8fafc81f85eb8045986220ca3e.tar.bz2
[LLD] [COFF] Fix linking MSVC generated implib header objects (#122811)
ecb5ea6a266d5cc4e05252f6db4c73613b73cc3b tried to fix cases when LLD links what seems to be import library header objects from MSVC. However, the fix seems incorrect; the review at https://reviews.llvm.org/D133627 concluded that if this (treating this kind of symbol as a common symbol) is what link.exe does, it's fine. However, this is most probably not what link.exe does. The symbol mentioned in the commit message of ecb5ea6a266d5cc4e05252f6db4c73613b73cc3b would be a common symbol with a size of around 3 GB; this is not what might have been intended. That commit tried to avoid running into the error ".idata$4 should not refer to special section 0"; that issue is fixed for a similar style of section symbols in 4a4a8a1476b1386b523dc5b292ba9a5a6748a9cf. Therefore, revert ecb5ea6a266d5cc4e05252f6db4c73613b73cc3b and extend the fix from 4a4a8a1476b1386b523dc5b292ba9a5a6748a9cf to also work for the section symbols in MSVC generated import libraries. The main detail about them, is that for symbols of type IMAGE_SYM_CLASS_SECTION, the Value field is not an offset, but it is an optional set of flags, corresponding to the Characteristics of the section header (although it may be empty).
Diffstat (limited to 'llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp')
0 files changed, 0 insertions, 0 deletions