[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)
commitf90346f8f6ebd4ce4589ba070e4baaeede80988a
treed42569f06e42c11e8915b81a6789d0c50cbded83
parent3645149ea23ed708f08a333065327307dda1221e
[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

llvm-svn: 240020
llvm/include/llvm/Support/ELFRelocs/Sparc.def
llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp
llvm/lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp
llvm/test/CodeGen/SPARC/obj-relocs.ll
llvm/test/MC/Sparc/sparc-pic.s