diff options
author | Eric Christopher <echristo@apple.com> | 2010-06-16 21:32:38 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2010-06-16 21:32:38 +0000 |
commit | 74892d4f1f6af09b681fbbb0dde4e7f1cec19e96 (patch) | |
tree | cc674eaba7bb7088646d85b5b36e01798b8eb6d1 /llvm/lib/MC/MachObjectWriter.cpp | |
parent | 207cd4bbd700509a8e7c7545e65ab217e0853745 (diff) | |
download | bcm5719-llvm-74892d4f1f6af09b681fbbb0dde4e7f1cec19e96.tar.gz bcm5719-llvm-74892d4f1f6af09b681fbbb0dde4e7f1cec19e96.zip |
In progress on 32-bit addends.
llvm-svn: 106154
Diffstat (limited to 'llvm/lib/MC/MachObjectWriter.cpp')
-rw-r--r-- | llvm/lib/MC/MachObjectWriter.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/MC/MachObjectWriter.cpp b/llvm/lib/MC/MachObjectWriter.cpp index 7be7af21b3f..347615011a9 100644 --- a/llvm/lib/MC/MachObjectWriter.cpp +++ b/llvm/lib/MC/MachObjectWriter.cpp @@ -756,8 +756,14 @@ public: 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; |