Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lld/COFF/Writer.cpp')
-rw-r--r--lld/COFF/Writer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lld/COFF/Writer.cpp b/lld/COFF/Writer.cpp
index 23ce8485581b..ca50e8bdce51 100644
--- a/lld/COFF/Writer.cpp
+++ b/lld/COFF/Writer.cpp
@@ -592,7 +592,8 @@ OutputSection *Writer::createSection(StringRef Name) {
// Dest is .reloc section. Add contents to that section.
void Writer::addBaserels(OutputSection *Dest) {
std::vector<uint32_t> V;
- Defined *ImageBase = cast<Defined>(Symtab->find("__ImageBase")->Body);
+ StringRef Name = Config->is64() ? "__ImageBase" : "___ImageBase";
+ Defined *ImageBase = cast<Defined>(Symtab->find(Name)->Body);
for (OutputSection *Sec : OutputSections) {
if (Sec == Dest)
continue;