diff options
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/MC/MachObjectWriter.cpp | 7 | ||||
| -rw-r--r-- | llvm/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp | 3 | 
2 files changed, 9 insertions, 1 deletions
| diff --git a/llvm/lib/MC/MachObjectWriter.cpp b/llvm/lib/MC/MachObjectWriter.cpp index 6e720115dd1..e016f09c95f 100644 --- a/llvm/lib/MC/MachObjectWriter.cpp +++ b/llvm/lib/MC/MachObjectWriter.cpp @@ -584,9 +584,14 @@ IsSymbolRefDifferenceFullyResolvedImpl(const MCAssembler &Asm,      // requires the compiler to use .set to absolutize the differences between      // symbols which the compiler knows to be assembly time constants, so we      // don't need to worry about considering symbol differences fully resolved. +    // +    // If the file isn't using sub-sections-via-symbols, we can make the +    // same assumptions about any symbol that we normally make about +    // assembler locals.      if (!Asm.getBackend().hasReliableSymbolDifference()) { -      if (!SA.isTemporary() || !SA.isInSection() || &SecA != &SecB) +      if ((!SA.isTemporary() && Asm.getSubsectionsViaSymbols()) || +           !SA.isInSection() || &SecA != &SecB)          return false;        return true;      } diff --git a/llvm/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp b/llvm/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp index f394b4f3755..d0e66828c0c 100644 --- a/llvm/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp +++ b/llvm/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp @@ -62,6 +62,9 @@ static bool getARMFixupKindMachOInfo(unsigned Kind, unsigned &RelocType,    default:      return false; +  case ARM::fixup_t2_condbranch: +    assert(0); +    return false;    case FK_Data_1:      Log2Size = llvm::Log2_32(1);      return true; | 

