[lld] r189874 - [lld][ELF][X86_64] Fix alignment of init_array/fini_array sections
Shankar Easwaran
shankare at codeaurora.org
Tue Sep 3 15:44:46 PDT 2013
Author: shankare
Date: Tue Sep 3 17:44:46 2013
New Revision: 189874
URL: http://llvm.org/viewvc/llvm-project?rev=189874&view=rev
Log:
[lld][ELF][X86_64] Fix alignment of init_array/fini_array sections
Modified:
lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64LinkingContext.cpp
Modified: lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64LinkingContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64LinkingContext.cpp?rev=189874&r1=189873&r2=189874&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64LinkingContext.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64LinkingContext.cpp Tue Sep 3 17:44:46 2013
@@ -401,13 +401,14 @@ public:
X86_64InitAtom(const File &f, StringRef function)
: InitFiniAtom(f, ".init_array") {
#ifndef NDEBUG
- _name = "__init_fn";
+ _name = "__init_fn_";
_name += function;
#endif
}
virtual ArrayRef<uint8_t> rawContent() const {
return ArrayRef<uint8_t>(x86_64InitFiniAtomContent, 8);
}
+ virtual Alignment alignment() const { return Alignment(3); }
};
class X86_64FiniAtom : public InitFiniAtom {
@@ -422,6 +423,8 @@ public:
virtual ArrayRef<uint8_t> rawContent() const {
return ArrayRef<uint8_t>(x86_64InitFiniAtomContent, 8);
}
+
+ virtual Alignment alignment() const { return Alignment(3); }
};
class X86_64InitFiniFile : public SimpleFile {
More information about the llvm-commits
mailing list