[lld] r221586 - [ELF] .dynamic should have SHT_DYNAMIC flag
Shankar Easwaran
shankare at codeaurora.org
Mon Nov 10 06:54:53 PST 2014
Author: shankare
Date: Mon Nov 10 08:54:53 2014
New Revision: 221586
URL: http://llvm.org/viewvc/llvm-project?rev=221586&view=rev
Log:
[ELF] .dynamic should have SHT_DYNAMIC flag
Modified:
lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h
lld/trunk/test/elf/X86_64/yamlinput.test
Modified: lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h?rev=221586&r1=221585&r2=221586&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h Mon Nov 10 08:54:53 2014
@@ -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);
}
Modified: lld/trunk/test/elf/X86_64/yamlinput.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/yamlinput.test?rev=221586&r1=221585&r2=221586&view=diff
==============================================================================
--- lld/trunk/test/elf/X86_64/yamlinput.test (original)
+++ lld/trunk/test/elf/X86_64/yamlinput.test Mon Nov 10 08:54:53 2014
@@ -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)
More information about the llvm-commits
mailing list