parent
e8936bca72
commit
9b18f50f79
|
@ -871,8 +871,6 @@ ExprValue LinkerScript::getSymbolValue(const Twine &Loc, StringRef S) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
bool LinkerScript::isDefined(StringRef S) { return Symtab->find(S) != nullptr; }
|
||||
|
||||
static const size_t NoPhdr = -1;
|
||||
|
||||
// Returns indices of ELF headers containing specific section. Each index is a
|
||||
|
|
|
@ -241,7 +241,6 @@ public:
|
|||
void discard(ArrayRef<InputSectionBase *> V);
|
||||
|
||||
ExprValue getSymbolValue(const Twine &Loc, StringRef S);
|
||||
bool isDefined(StringRef S);
|
||||
|
||||
void fabricateDefaultCommands();
|
||||
void addOrphanSections(OutputSectionFactory &Factory);
|
||||
|
|
|
@ -1007,7 +1007,7 @@ Expr ScriptParser::readPrimary() {
|
|||
}
|
||||
if (Tok == "DEFINED") {
|
||||
StringRef Name = readParenLiteral();
|
||||
return [=] { return Script->isDefined(Name) ? 1 : 0; };
|
||||
return [=] { return Symtab->find(Name) ? 1 : 0; };
|
||||
}
|
||||
if (Tok == "LENGTH") {
|
||||
StringRef Name = readParenLiteral();
|
||||
|
|
Loading…
Reference in New Issue