[lld] r249404 - Rearrange a bit for clarity. NFC.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 6 07:17:54 PDT 2015
Author: rafael
Date: Tue Oct 6 09:17:53 2015
New Revision: 249404
URL: http://llvm.org/viewvc/llvm-project?rev=249404&view=rev
Log:
Rearrange a bit for clarity. NFC.
Modified:
lld/trunk/ELF/OutputSections.cpp
Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=249404&r1=249403&r2=249404&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Tue Oct 6 09:17:53 2015
@@ -556,17 +556,14 @@ void SymbolTableSection<ELFT>::writeGlob
ESym->setBindingAndType(Binding, InputSym.getType());
ESym->st_size = InputSym.st_size;
ESym->setVisibility(Visibility);
- if (InputSym.isAbsolute()) {
- ESym->st_shndx = SHN_ABS;
- ESym->st_value = InputSym.st_value;
- }
+ ESym->st_value = getSymVA(EBody, BssSec);
if (Section)
Out = Section->getOutputSection();
- ESym->st_value = getSymVA(EBody, BssSec);
-
- if (Out)
+ if (InputSym.isAbsolute())
+ ESym->st_shndx = SHN_ABS;
+ else if (Out)
ESym->st_shndx = Out->getSectionIndex();
}
if (!StrTabSec.isDynamic())
More information about the llvm-commits
mailing list