summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Writer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/Writer.cpp')
-rw-r--r--lld/ELF/Writer.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index cb5bc4cc872..b752ec1f685 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -880,9 +880,8 @@ template <class ELFT> static uint32_t getAlignment(SharedSymbol<ELFT> *SS) {
template <class ELFT>
void Writer<ELFT>::addCopyRelSymbol(SharedSymbol<ELFT> *SS) {
ensureBss();
- uintX_t Off = Out<ELFT>::Bss->getSize();
uintX_t Align = getAlignment(SS);
- Off = alignTo(Off, Align);
+ uintX_t Off = alignTo(Out<ELFT>::Bss->getSize(), Align);
Out<ELFT>::Bss->setSize(Off + SS->template getSize<ELFT>());
Out<ELFT>::Bss->updateAlign(Align);
uintX_t Shndx = SS->Sym.st_shndx;
OpenPOWER on IntegriCloud