[ELF] .dynamic should have SHT_DYNAMIC flag

llvm-svn: 221586
This commit is contained in:
Shankar Easwaran 2014-11-10 14:54:53 +00:00
parent 78aa81d6ed
commit 38d187021f
2 changed files with 6 additions and 1 deletions

View File

@ -429,6 +429,10 @@ public:
void setInfo(uint64_t info) { _shInfo = info; }
void setFlag(uint64_t flags) { _flags = flags; }
void setType(int16_t type) { _type = type; }
inline range<ChunkIter> sections() { return _sections; }
// The below functions returns the properties of the MergeSection
@ -1104,6 +1108,7 @@ public:
_dynamicSymbolTable->getStringTable();
this->_link = dynamicStringTable->ordinal();
if (this->_parent) {
this->_parent->setType(this->_type);
this->_parent->setInfo(this->_info);
this->_parent->setLink(this->_link);
}

View File

@ -96,7 +96,7 @@ SECTIONS: }
SECTIONS: Section {
SECTIONS: Index: 11
SECTIONS: Name: .dynamic
SECTIONS: Type: SHT_PROGBITS (0x1)
SECTIONS: Type: SHT_DYNAMIC (0x6)
SECTIONS: Flags [ (0x3)
SECTIONS: SHF_ALLOC (0x2)
SECTIONS: SHF_WRITE (0x1)