[llvm-commits] [llvm] r106154 - /llvm/trunk/lib/MC/MachObjectWriter.cpp
Eric Christopher
echristo at apple.com
Wed Jun 16 14:32:38 PDT 2010
Author: echristo
Date: Wed Jun 16 16:32:38 2010
New Revision: 106154
URL: http://llvm.org/viewvc/llvm-project?rev=106154&view=rev
Log:
In progress on 32-bit addends.
Modified:
llvm/trunk/lib/MC/MachObjectWriter.cpp
Modified: llvm/trunk/lib/MC/MachObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MachObjectWriter.cpp?rev=106154&r1=106153&r2=106154&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MachObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/MachObjectWriter.cpp Wed Jun 16 16:32:38 2010
@@ -756,8 +756,14 @@
MCSymbolData *SD_A = &Asm.getSymbolData(Target.getSymA()->getSymbol());
unsigned Index = SD_A->getIndex();
- if (Target.getSymB())
+ // We're only going to have a second symbol in pic mode and it'll be a
+ // subtraction from the picbase. For 32-bit pic the addend is the difference
+ // between the picbase and the next address.
+ if (Target.getSymB()) {
IsPCRel = 1;
+ } else {
+ FixedValue = 0;
+ }
// struct relocation_info (8 bytes)
MachRelocationEntry MRE;
More information about the llvm-commits
mailing list