mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-25 17:31:02 +00:00
[ELF] - Move LinkerScript::discard to LinkerScriptBase. NFC.
Became possible after r297844 llvm-svn: 297848
This commit is contained in:
parent
a5f332edd1
commit
503206c567
@ -288,11 +288,10 @@ void LinkerScriptBase::computeInputSections(InputSectionDescription *I) {
|
||||
}
|
||||
}
|
||||
|
||||
template <class ELFT>
|
||||
void LinkerScript<ELFT>::discard(ArrayRef<InputSectionBase *> V) {
|
||||
void LinkerScriptBase::discard(ArrayRef<InputSectionBase *> V) {
|
||||
for (InputSectionBase *S : V) {
|
||||
S->Live = false;
|
||||
if (S == In<ELFT>::ShStrTab)
|
||||
if (S == InX::ShStrTab)
|
||||
error("discarding .shstrtab section is not allowed");
|
||||
discard(S->DependentSections);
|
||||
}
|
||||
|
@ -267,6 +267,7 @@ public:
|
||||
uint64_t getDot() { return Dot; }
|
||||
OutputSection *getOutputSection(const Twine &Loc, StringRef S);
|
||||
uint64_t getOutputSectionSize(StringRef S);
|
||||
void discard(ArrayRef<InputSectionBase *> V);
|
||||
|
||||
virtual uint64_t getSymbolValue(const Twine &Loc, StringRef S) = 0;
|
||||
virtual bool isDefined(StringRef S) = 0;
|
||||
@ -300,7 +301,6 @@ public:
|
||||
|
||||
void writeDataBytes(StringRef Name, uint8_t *Buf);
|
||||
void addSymbol(SymbolAssignment *Cmd);
|
||||
void discard(ArrayRef<InputSectionBase *> V);
|
||||
void processCommands(OutputSectionFactory &Factory);
|
||||
|
||||
uint64_t getSymbolValue(const Twine &Loc, StringRef S) override;
|
||||
|
Loading…
Reference in New Issue
Block a user