[all-commits] [llvm/llvm-project] dcc08a: [llvm-dlltool] Implement the --identify option (#1...
Martin Storsjö via All-commits
all-commits at lists.llvm.org
Thu Feb 20 14:49:40 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: dcc08a17c781a5066ab17b9791e1c455f7cedbf7
https://github.com/llvm/llvm-project/commit/dcc08a17c781a5066ab17b9791e1c455f7cedbf7
Author: Martin Storsjö <martin at martin.st>
Date: 2025-02-20 (Thu, 20 Feb 2025)
Changed paths:
M llvm/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp
M llvm/lib/ToolDrivers/llvm-dlltool/Options.td
A llvm/test/tools/llvm-dlltool/Inputs/gnu_foo_lib_h.yaml
A llvm/test/tools/llvm-dlltool/Inputs/gnu_foo_lib_s00000.yaml
A llvm/test/tools/llvm-dlltool/Inputs/gnu_foo_lib_t.yaml
A llvm/test/tools/llvm-dlltool/Inputs/llvm_foo_dll_1.yaml
A llvm/test/tools/llvm-dlltool/Inputs/llvm_foo_dll_2.yaml
A llvm/test/tools/llvm-dlltool/Inputs/llvm_foo_dll_3.yaml
A llvm/test/tools/llvm-dlltool/identify.test
Log Message:
-----------
[llvm-dlltool] Implement the --identify option (#127465)
This option prints the name of the DLL that gets imported, when linking
against an import library.
This is implemented using the same strategy as GNU dlltool does; looking
for the contents of .idata$6 or .idata$7 chunks. The right section name
to check for is chosen by identifying whether the library is GNU or LLVM
style. In the case of GNU import libraries, the DLL name is in an
.idata$7 chunk. However there are also other chunks with that section
name (for entries for the IAT or ILT); identify these by looking for
whether a chunk contains relocations.
Alternatively, one could also just look for .idata$2 chunks, look for
relocations at the right offset, and locate data at the symbol that the
relocation points at (which may be in the same or in another object
file).
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list