[llvm-commits] [llvm] r111925 - /llvm/trunk/lib/MC/ELFObjectWriter.cpp
Benjamin Kramer
benny.kra at googlemail.com
Tue Aug 24 10:34:39 PDT 2010
Author: d0k
Date: Tue Aug 24 12:34:39 2010
New Revision: 111925
URL: http://llvm.org/viewvc/llvm-project?rev=111925&view=rev
Log:
Relocate against parent if the symbol is not in section or it's a common symbol, from Roman Divacky.
Modified:
llvm/trunk/lib/MC/ELFObjectWriter.cpp
Modified: llvm/trunk/lib/MC/ELFObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/ELFObjectWriter.cpp?rev=111925&r1=111924&r2=111925&view=diff
==============================================================================
--- llvm/trunk/lib/MC/ELFObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/ELFObjectWriter.cpp Tue Aug 24 12:34:39 2010
@@ -477,7 +477,8 @@
const MCSymbolData *Base = Asm.getAtom(Layout, &SD);
if (Base) {
- if (MCFragment *F = SD.getFragment()) {
+ MCFragment *F = SD.getFragment();
+ if (F && (!Symbol->isInSection() || SD.isCommon())) {
Index = F->getParent()->getOrdinal() + LocalSymbolData.size() + 1;
Value += Layout.getSymbolAddress(&SD);
} else
More information about the llvm-commits
mailing list