summaryrefslogtreecommitdiffstats
path: root/lld/COFF/Symbols.cpp
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2018-08-31 07:45:20 +0000
committerMartin Storsjo <martin@martin.st>2018-08-31 07:45:20 +0000
commit802fcb4167a309dc5a10af14d1a1aaf5a2c625de (patch)
tree5624816b41a6f6a53b88e4b9825635ae880228c1 /lld/COFF/Symbols.cpp
parent83e9f928ba28b7bc6dd6a7f1a255a59f8b6785a8 (diff)
downloadbcm5719-llvm-802fcb4167a309dc5a10af14d1a1aaf5a2c625de.tar.gz
bcm5719-llvm-802fcb4167a309dc5a10af14d1a1aaf5a2c625de.zip
[COFF] When doing automatic dll imports, replace whole .refptr.<var> chunks with __imp_<var>
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). As there are now cases for both setting the Live variable to true and false externally, remove the accessors and setters and just make the variable public instead. Differential Revision: https://reviews.llvm.org/D51456 llvm-svn: 341175
Diffstat (limited to 'lld/COFF/Symbols.cpp')
-rw-r--r--lld/COFF/Symbols.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/COFF/Symbols.cpp b/lld/COFF/Symbols.cpp
index fc0ade2618b..ccaf86417f1 100644
--- a/lld/COFF/Symbols.cpp
+++ b/lld/COFF/Symbols.cpp
@@ -54,7 +54,7 @@ InputFile *Symbol::getFile() {
bool Symbol::isLive() const {
if (auto *R = dyn_cast<DefinedRegular>(this))
- return R->getChunk()->isLive();
+ return R->getChunk()->Live;
if (auto *Imp = dyn_cast<DefinedImportData>(this))
return Imp->File->Live;
if (auto *Imp = dyn_cast<DefinedImportThunk>(this))
OpenPOWER on IntegriCloud