[PATCH] D51456: [LLD] [COFF] When doing automatic dll imports, replace whole .refptr.<var> chunks with __imp_<var>
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 29 13:16:00 PDT 2018
mstorsjo created this revision.
mstorsjo added reviewers: ruiu, rnk, pcc.
After fixing up the runtime pseudo relocation, the .refptr.<var> will be a plain pointer with the same value as the IAT entry itself. To save a little binary size and reduce the number of runtime pseudo relocations, redirect references to the IAT entry (via the __imp_<var> symbol) itself and discard the .refptr.<var> chunk (as long as the same section chunk doesn't contain anything else than the single pointer).
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D51456
Files:
COFF/Chunks.h
COFF/SymbolTable.cpp
test/COFF/autoimport-refptr.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51456.163169.patch
Type: text/x-patch
Size: 3695 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180829/c1b0695a/attachment.bin>
More information about the llvm-commits
mailing list