summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/lib/ReaderWriter/ELF/Chunk.h2
-rw-r--r--lld/lib/ReaderWriter/ELF/SectionChunks.h2
-rw-r--r--lld/lib/ReaderWriter/ELF/SegmentChunks.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/lld/lib/ReaderWriter/ELF/Chunk.h b/lld/lib/ReaderWriter/ELF/Chunk.h
index 2e03ca826a0..f223b6c5416 100644
--- a/lld/lib/ReaderWriter/ELF/Chunk.h
+++ b/lld/lib/ReaderWriter/ELF/Chunk.h
@@ -98,7 +98,7 @@ protected:
const ELFLinkingContext &_ctx;
uint64_t _fsize = 0;
uint64_t _msize = 0;
- uint64_t _alignment = 0;
+ uint64_t _alignment = 1;
uint32_t _order = 0;
uint64_t _ordinal = 1;
uint64_t _start = 0;
diff --git a/lld/lib/ReaderWriter/ELF/SectionChunks.h b/lld/lib/ReaderWriter/ELF/SectionChunks.h
index e716faf8cbd..613858a39e1 100644
--- a/lld/lib/ReaderWriter/ELF/SectionChunks.h
+++ b/lld/lib/ReaderWriter/ELF/SectionChunks.h
@@ -530,7 +530,7 @@ private:
int64_t _shInfo = 0;
int64_t _entSize = 0;
int64_t _link = 0;
- uint64_t _alignment = 0;
+ uint64_t _alignment = 1;
int64_t _kind = 0;
int64_t _type = 0;
bool _isLoadableSection = false;
diff --git a/lld/lib/ReaderWriter/ELF/SegmentChunks.h b/lld/lib/ReaderWriter/ELF/SegmentChunks.h
index b0b071e61cd..cff9530b1b1 100644
--- a/lld/lib/ReaderWriter/ELF/SegmentChunks.h
+++ b/lld/lib/ReaderWriter/ELF/SegmentChunks.h
@@ -317,7 +317,7 @@ Segment<ELFT>::Segment(const ELFLinkingContext &ctx, StringRef name,
const typename TargetLayout<ELFT>::SegmentType type)
: Chunk<ELFT>(name, Chunk<ELFT>::Kind::ELFSegment, ctx), _segmentType(type),
_flags(0), _atomflags(0) {
- this->_alignment = 0;
+ this->_alignment = 1;
this->_fsize = 0;
_outputMagic = ctx.getOutputMagic();
}
OpenPOWER on IntegriCloud