diff options
| author | Daniel Dunbar <daniel@zuster.org> | 2010-03-13 02:38:00 +0000 |
|---|---|---|
| committer | Daniel Dunbar <daniel@zuster.org> | 2010-03-13 02:38:00 +0000 |
| commit | 34b8e553ea241c57daf9e740b199ec2f526fdce8 (patch) | |
| tree | e946c1fc99c7d65e0caf21521dd85fee556fa3e8 /llvm/lib/MC | |
| parent | 322fec671bcd4d4ade77bb8ad5a62728729c540a (diff) | |
| download | bcm5719-llvm-34b8e553ea241c57daf9e740b199ec2f526fdce8.tar.gz bcm5719-llvm-34b8e553ea241c57daf9e740b199ec2f526fdce8.zip | |
MC/Mach-O: PCrel relocations weren't using the right base address, they are
relative to the fragment address, not its offset. This was masked by the text
section normally being at address 0.
llvm-svn: 98420
Diffstat (limited to 'llvm/lib/MC')
| -rw-r--r-- | llvm/lib/MC/MCAssembler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCAssembler.cpp b/llvm/lib/MC/MCAssembler.cpp index 88be99cffdd..29ac8684bde 100644 --- a/llvm/lib/MC/MCAssembler.cpp +++ b/llvm/lib/MC/MCAssembler.cpp @@ -1024,7 +1024,7 @@ bool MCAssembler::EvaluateFixup(const MCAsmLayout &Layout, MCAsmFixup &Fixup, } if (IsPCRel) - Value -= DF->getOffset() + Fixup.Offset; + Value -= DF->getAddress() + Fixup.Offset; return IsResolved; } |

