[PATCH] D129952: [ORC][COFF] Handle COFF import files of static archive.

Sunho Kim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 16 21:20:45 PDT 2022


sunho created this revision.
sunho added reviewers: lhames, sgraenitz.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
sunho requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Handles COFF import files of static archive. Changes static library genrator to build up object file map keyed by symbol name that excludes the symbols from dllimported symbols so that static generator will not be responsible for them. It exposes the list of dynamic libraries that need to be imported. Client should properly load the libraries in this list beforehand. Object file map is also an improvment from the past in terms of performance. Archive.findSym does a slow linear serach of symbol list to find the symbol. (we were the only user of findSym function in fact)

There is a room for improvements in how to load the libraries in the list. We currently just hand the responsibility over to the clinet. A better way would be let ORC read this list and hand them over to JITLink side that would also help validation (e.g. not trying to generate stub for non dllimported targets) Nevertheless, we will have to exclude the symbols from COFF object file list and need a way to access this list, which this patch offers.


https://reviews.llvm.org/D129952

Files:
  llvm/include/llvm/ExecutionEngine/Orc/ExecutionUtils.h
  llvm/lib/ExecutionEngine/JITLink/COFF_x86_64.cpp
  llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp
  llvm/tools/llvm-jitlink/llvm-jitlink.cpp
  llvm/tools/llvm-jitlink/llvm-jitlink.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129952.445287.patch
Type: text/x-patch
Size: 6206 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220717/fc03d488/attachment.bin>


More information about the llvm-commits mailing list