Commit 59c03cf7 authored by Daniel Sanders's avatar Daniel Sanders
Browse files

Merging r238751:

------------------------------------------------------------------------
r238751 | rafael | 2015-06-01 16:10:51 +0100 (Mon, 01 Jun 2015) | 3 lines

Fix relocation selection for foo-. on mips.

This handles only the 32 bit case.
------------------------------------------------------------------------

llvm-svn: 239700
parent a83d904e
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -55,8 +55,7 @@ unsigned MipsELFObjectWriter::GetRelocType(const MCValue &Target,
  default:
    llvm_unreachable("invalid fixup kind!");
  case FK_Data_4:
    Type = ELF::R_MIPS_32;
    break;
    return IsPCRel ? ELF::R_MIPS_PC32 : ELF::R_MIPS_32;
  case FK_Data_8:
    Type = ELF::R_MIPS_64;
    break;
+10 −0
Original line number Diff line number Diff line
// RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux < %s | llvm-readobj -r | FileCheck  %s

// Test that we produce the correct relocation.
// FIXME: move more relocation only tests here.

        .long foo
// CHECK: R_MIPS_32 foo

        .long foo-.
// CHECK: R_MIPS_PC32 foo