[PowerPC] Add some special @got@tprel fixup cases
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Fri, 5 Jul 2013 13:49:46 +0000 (13:49 +0000)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Fri, 5 Jul 2013 13:49:46 +0000 (13:49 +0000)
commitb2044311063c36eb4139549c00d84ab19ff2ed5c
treeac06cf93d586b8ac28534ef12112024f837a7eac
parent6f9c8d2148b2a031561c93e7dc09268c45a4f746
[PowerPC] Add some special @got@tprel fixup cases

When a target@got@tprel or target@got@tprel@l symbol variant is used in
a fixup_ppc_half16 (*not* fixup_ppc_half16ds) context, we currently fail,
since the corresponding R_PPC64_GOT_TPREL16 / R_PPC64_GOT_TPREL16_LO
relocation types do not exist.

However, since such symbol variants resolve to GOT offsets which are
always 4-aligned, we can simply instead use the _DS variants of the
relocation types, which *do* exist.

The same applies for the @got@dtprel variants.

llvm-svn: 185700
llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp
llvm/test/MC/PowerPC/ppc64-fixups.s