summaryrefslogtreecommitdiffstats
path: root/lld/ELF/OutputSections.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/OutputSections.cpp')
-rw-r--r--lld/ELF/OutputSections.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp
index c019fa0f444..7617585a803 100644
--- a/lld/ELF/OutputSections.cpp
+++ b/lld/ELF/OutputSections.cpp
@@ -839,7 +839,7 @@ static int getPriority(StringRef S) {
// This function is called after we sort input sections
// and scan relocations to setup sections' offsets.
template <class ELFT> void OutputSection<ELFT>::assignOffsets() {
- uintX_t Off = 0;
+ uintX_t Off = this->Header.sh_size;
for (InputSection<ELFT> *S : Sections) {
Off = alignTo(Off, S->Align);
S->OutSecOff = Off;
OpenPOWER on IntegriCloud