MC/Mach-O: Also set the PCrel bit in the second half of paired relocation entries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98081 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar 2010-03-09 21:27:47 +00:00
parent e180fa962c
commit aef9d7af69

View File

@ -489,13 +489,11 @@ public:
Relocs.push_back(MRE); Relocs.push_back(MRE);
if (Type == RIT_LocalDifference) { if (Type == RIT_LocalDifference) {
Type = RIT_Pair;
MachRelocationEntry MRE; MachRelocationEntry MRE;
MRE.Word0 = ((0 << 0) | MRE.Word0 = ((0 << 0) |
(Type << 24) | (RIT_Pair << 24) |
(Log2Size << 28) | (Log2Size << 28) |
(0 << 30) | (IsPCRel << 30) |
RF_Scattered); RF_Scattered);
MRE.Word1 = Value2; MRE.Word1 = Value2;
Relocs.push_back(MRE); Relocs.push_back(MRE);