summaryrefslogtreecommitdiffstats
path: root/lld/ELF/LinkerScript.h
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2016-09-23 13:17:23 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2016-09-23 13:17:23 +0000
commitf34f45fd534140f082d41dbb6a7c60dc675870c4 (patch)
tree1172d9b359b658f984c144eb9493a78e17901cc9 /lld/ELF/LinkerScript.h
parentd4dea164dd453f567d9d33f3c158c33d6904987f (diff)
downloadbcm5719-llvm-f34f45fd534140f082d41dbb6a7c60dc675870c4.tar.gz
bcm5719-llvm-f34f45fd534140f082d41dbb6a7c60dc675870c4.zip
[ELF] - Linkerscript: implement DEFINED() command.
DEFINED(symbol) Return 1 if symbol is in the linker global symbol table and is defined before the statement using DEFINED in the script, otherwise return 0. Can be used to define default values for symbols. Found it in the wild. Differential revision: https://reviews.llvm.org/D24858 llvm-svn: 282245
Diffstat (limited to 'lld/ELF/LinkerScript.h')
-rw-r--r--lld/ELF/LinkerScript.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lld/ELF/LinkerScript.h b/lld/ELF/LinkerScript.h
index 654aae21dc6..1d3a713d8ce 100644
--- a/lld/ELF/LinkerScript.h
+++ b/lld/ELF/LinkerScript.h
@@ -157,6 +157,7 @@ public:
virtual uint64_t getOutputSectionAlign(StringRef Name) = 0;
virtual uint64_t getHeaderSize() = 0;
virtual uint64_t getSymbolValue(StringRef S) = 0;
+ virtual bool isDefined(StringRef S) = 0;
};
// ScriptConfiguration holds linker script parse results.
@@ -203,6 +204,7 @@ public:
uint64_t getOutputSectionAlign(StringRef Name) override;
uint64_t getHeaderSize() override;
uint64_t getSymbolValue(StringRef S) override;
+ bool isDefined(StringRef S) override;
std::vector<OutputSectionBase<ELFT> *> *OutputSections;
OpenPOWER on IntegriCloud