diff options
author | Rui Ueyama <ruiu@google.com> | 2013-09-13 20:53:11 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2013-09-13 20:53:11 +0000 |
commit | 1ea9b9770778a8b425ac375af2710434a39bd6a0 (patch) | |
tree | 8ce1c848b57ef710f4a28285b482978f6cc1c897 | |
parent | 17e32460ed016bc2ae168faeba924972b42be9eb (diff) | |
download | bcm5719-llvm-1ea9b9770778a8b425ac375af2710434a39bd6a0.tar.gz bcm5719-llvm-1ea9b9770778a8b425ac375af2710434a39bd6a0.zip |
[PECOFF] Fix atom default alignment.
Alignment(1) does not mean that the atom should be aligned on a 1 byte
boundary but on a 2^1 boundary. So, atoms without any specific alignment
requirements should have Alignment(0).
llvm-svn: 190723
-rw-r--r-- | lld/lib/ReaderWriter/PECOFF/Atoms.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lld/lib/ReaderWriter/PECOFF/Atoms.h b/lld/lib/ReaderWriter/PECOFF/Atoms.h index dc36175fffd..3de7d6e4082 100644 --- a/lld/lib/ReaderWriter/PECOFF/Atoms.h +++ b/lld/lib/ReaderWriter/PECOFF/Atoms.h @@ -100,7 +100,7 @@ public: virtual StringRef name() const { return _name; } virtual Interposable interposable() const { return interposeNo; } virtual Merge merge() const { return mergeNo; } - virtual Alignment alignment() const { return Alignment(1); } + virtual Alignment alignment() const { return Alignment(0); } virtual SectionChoice sectionChoice() const { return sectionBasedOnContent; } virtual StringRef customSectionName() const { return ""; } virtual SectionPosition sectionPosition() const { return sectionPositionAny; } @@ -152,7 +152,7 @@ public: ContentPermissions perms, uint64_t ordinal) : COFFBaseDefinedAtom(file, name, Kind::File), _sectionName(sectionName), _scope(scope), _contentType(contentType), _permissions(perms), - _ordinal(ordinal), _alignment(1) {} + _ordinal(ordinal), _alignment(0) {} static bool classof(const COFFBaseDefinedAtom *atom) { return atom->getKind() == Kind::File; @@ -222,7 +222,7 @@ class COFFLinkerInternalAtom : public COFFBaseDefinedAtom { public: virtual uint64_t ordinal() const { return 0; } virtual Scope scope() const { return scopeGlobal; } - virtual Alignment alignment() const { return Alignment(1); } + virtual Alignment alignment() const { return Alignment(0); } virtual uint64_t size() const { return _data.size(); } virtual ArrayRef<uint8_t> rawContent() const { return _data; } |