[PowerPC] Fix @got references to local symbols
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Mon, 1 Jul 2013 18:19:56 +0000 (18:19 +0000)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Mon, 1 Jul 2013 18:19:56 +0000 (18:19 +0000)
commit3a75861b0660d813796bdccba6f57f2b6a0f7f2a
tree5c6d4446406bbdbac2f105bc00cf661ffb4819d4
parent28d8ba5f79e986ebfdc29fcb67ecaf3a3c823db0
[PowerPC] Fix @got references to local symbols

A @got reference must always result in a relocation, so that
the linker has a chance to set up the GOT entry, even if the
symbol happens to be local.

Add a PPCELFObjectWriter::ExplicitRelSym routine that enforces
a relocation to be emitted for GOT references.

llvm-svn: 185353
llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp
llvm/test/MC/PowerPC/ppc64-fixup-explicit.s [new file with mode: 0644]