[SPARC] Repair GOT references to internal symbols.
authorJames Y Knight <jyknight@google.com>
Thu, 18 Jun 2015 15:05:15 +0000 (15:05 +0000)
committerJames Y Knight <jyknight@google.com>
Thu, 18 Jun 2015 15:05:15 +0000 (15:05 +0000)
commitd280420ee98d34f350bdf429f3a7fe95d80e309f
tree53fcc040b584d88e8a54b6cca3a0ab5c5a1d7068
parentf314160e32463f740114b02e807a9520d531c675
[SPARC] Repair GOT references to internal symbols.

They had been getting emitted as a section + offset reference, which
is bogus since the value needs to be the offset within the GOT, not
the actual address of the symbol's object.

Differential Revision: http://reviews.llvm.org/D10441

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240020 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/ELFRelocs/Sparc.def
lib/Target/Sparc/AsmParser/SparcAsmParser.cpp
lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp
test/CodeGen/SPARC/obj-relocs.ll
test/MC/Sparc/sparc-pic.s