Skip to content

Conversation

@llvmbot
Copy link
Member

@llvmbot llvmbot commented Mar 21, 2025

Backport dcc08a1 1ca93b1

Requested by: @mstorsjo

@llvmbot
Copy link
Member Author

llvmbot commented Mar 21, 2025

@cjacek What do you think about merging this PR to the release branch?

@github-project-automation github-project-automation bot moved this from Needs Triage to Needs Merge in LLVM Release Status Mar 21, 2025
@mstorsjo mstorsjo changed the title release/20.x: [llvm-dlltool] Add a missing dependency release/20.x: [llvm-dlltool] Implement the --identify option Mar 24, 2025
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).

(cherry picked from commit dcc08a1)
This was missed in dcc08a1.

(cherry picked from commit 1ca93b1)
@tstellar tstellar merged commit f7b6f23 into llvm:release/20.x Mar 25, 2025
7 of 10 checks passed
@github-project-automation github-project-automation bot moved this from Needs Merge to Done in LLVM Release Status Mar 25, 2025
@github-actions
Copy link

@mstorsjo (or anyone else). If you would like to add a note about this fix in the release notes (completely optional). Please reply to this comment with a one or two sentence description of the fix. When you are done, please add the release:note label to this PR.

@mstorsjo
Copy link
Member

@mstorsjo (or anyone else). If you would like to add a note about this fix in the release notes (completely optional). Please reply to this comment with a one or two sentence description of the fix. When you are done, please add the release:note label to this PR.

We could add this bullet to the release notes:

  • Implemented the --identify option in llvm-dlltool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

4 participants