forked from OSchip/llvm-project
parent
c0ea1e6d63
commit
bd481b8f89
|
@ -133,7 +133,7 @@ public:
|
||||||
typedef typename llvm::object::ELFFile<ELFT>::uintX_t uintX_t;
|
typedef typename llvm::object::ELFFile<ELFT>::uintX_t uintX_t;
|
||||||
typedef typename llvm::object::ELFFile<ELFT>::Elf_Shdr Elf_Shdr;
|
typedef typename llvm::object::ELFFile<ELFT>::Elf_Shdr Elf_Shdr;
|
||||||
Writer(SymbolTable *T)
|
Writer(SymbolTable *T)
|
||||||
: Symtab(T), SymbolTable(*T), StringTable(T->getStringBuilder()) {}
|
: Symtab(T), SymTable(*T), StringTable(T->getStringBuilder()) {}
|
||||||
void run();
|
void run();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -152,7 +152,7 @@ private:
|
||||||
uintX_t SizeOfHeaders;
|
uintX_t SizeOfHeaders;
|
||||||
uintX_t SectionHeaderOff;
|
uintX_t SectionHeaderOff;
|
||||||
|
|
||||||
SymbolTableSection<ELFT> SymbolTable;
|
SymbolTableSection<ELFT> SymTable;
|
||||||
|
|
||||||
unsigned StringTableIndex;
|
unsigned StringTableIndex;
|
||||||
StringTableSection<ELFT::Is64Bits> StringTable;
|
StringTableSection<ELFT::Is64Bits> StringTable;
|
||||||
|
@ -323,10 +323,10 @@ template <class ELFT> void Writer<ELFT>::assignAddresses() {
|
||||||
std::stable_sort(OutputSections.begin(), OutputSections.end(),
|
std::stable_sort(OutputSections.begin(), OutputSections.end(),
|
||||||
compSec<ELFT::Is64Bits>);
|
compSec<ELFT::Is64Bits>);
|
||||||
|
|
||||||
OutputSections.push_back(&SymbolTable);
|
OutputSections.push_back(&SymTable);
|
||||||
OutputSections.push_back(&StringTable);
|
OutputSections.push_back(&StringTable);
|
||||||
StringTableIndex = OutputSections.size();
|
StringTableIndex = OutputSections.size();
|
||||||
SymbolTable.setStringTableIndex(StringTableIndex);
|
SymTable.setStringTableIndex(StringTableIndex);
|
||||||
|
|
||||||
for (OutputSectionBase<ELFT::Is64Bits> *Sec : OutputSections) {
|
for (OutputSectionBase<ELFT::Is64Bits> *Sec : OutputSections) {
|
||||||
StringTable.add(Sec->getName());
|
StringTable.add(Sec->getName());
|
||||||
|
|
Loading…
Reference in New Issue