Pull in r224415 from upstream llvm trunk (by Justin Hibbits): Add parsing of 'foo@local". Summary: Currently, it supports generating, but not parsing, this expression. Test added as well. Test Plan: New test added, no regressions due to this. Reviewers: hfinkel Reviewed By: hfinkel Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6672 Pull in r224494 from upstream llvm trunk (by Justin Hibbits): Add a corresponding '@LOCAL' parse to match r224415. Pointed out by Jim Grosbach. Introduced here: http://svnweb.freebsd.org/changeset/base/276223 Index: lib/MC/MCExpr.cpp =================================================================== --- lib/MC/MCExpr.cpp +++ lib/MC/MCExpr.cpp @@ -348,6 +348,8 @@ MCSymbolRefExpr::getVariantKindForName(StringRef N .Case("got@h", VK_PPC_GOT_HI) .Case("GOT@HA", VK_PPC_GOT_HA) .Case("got@ha", VK_PPC_GOT_HA) + .Case("local", VK_PPC_LOCAL) + .Case("LOCAL", VK_PPC_LOCAL) .Case("TOCBASE", VK_PPC_TOCBASE) .Case("tocbase", VK_PPC_TOCBASE) .Case("TOC", VK_PPC_TOC) Index: test/MC/PowerPC/ppc-reloc.s =================================================================== --- test/MC/PowerPC/ppc-reloc.s +++ test/MC/PowerPC/ppc-reloc.s @@ -7,6 +7,7 @@ .align 2 foo: bl printf@plt + bl _GLOBAL_OFFSET_TABLE_@local-4 .LC1: .size foo, . - foo @@ -13,5 +14,6 @@ foo: # CHECK: Relocations [ # CHECK-NEXT: Section (2) .rela.text { # CHECK-NEXT: 0x0 R_PPC_PLTREL24 printf 0x0 +# CHECK-NEXT: 0x4 R_PPC_LOCAL24PC _GLOBAL_OFFSET_TABLE_ 0xFFFFFFFC # CHECK-NEXT: } # CHECK-NEXT: ]