From 5a0b2f75db8fe7604818f0b42348bd6000bae992 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Fri, 5 Feb 2016 19:13:18 +0000 Subject: [PATCH] Simplify. NFC. llvm-svn: 259903 --- lld/ELF/OutputSections.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index cb98326d4404..3c0f58ea44d3 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -271,8 +271,7 @@ template void RelocationSection::writeTo(uint8_t *Buf) { } template unsigned RelocationSection::getRelocOffset() { - const unsigned EntrySize = IsRela ? sizeof(Elf_Rela) : sizeof(Elf_Rel); - return EntrySize * Relocs.size(); + return this->Header.sh_entsize * Relocs.size(); } template void RelocationSection::finalize() {