diff options
author | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2013-07-05 13:49:46 +0000 |
---|---|---|
committer | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2013-07-05 13:49:46 +0000 |
commit | 457571ed6977f78ca8d30b993fa7e86e2d7ad8d5 (patch) | |
tree | 86df432d9bbeab64a95f581c15352adcdfc66fa8 /test/MC/PowerPC | |
parent | 47734db936bd3b434d60f9daee5b34bc722ee3ba (diff) | |
download | external_llvm-457571ed6977f78ca8d30b993fa7e86e2d7ad8d5.zip external_llvm-457571ed6977f78ca8d30b993fa7e86e2d7ad8d5.tar.gz external_llvm-457571ed6977f78ca8d30b993fa7e86e2d7ad8d5.tar.bz2 |
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185700 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/PowerPC')
-rw-r--r-- | test/MC/PowerPC/ppc64-fixups.s | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/MC/PowerPC/ppc64-fixups.s b/test/MC/PowerPC/ppc64-fixups.s index 42f9c06..7347432 100644 --- a/test/MC/PowerPC/ppc64-fixups.s +++ b/test/MC/PowerPC/ppc64-fixups.s @@ -318,6 +318,16 @@ base: # CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_TPREL16_HI target 0x0 addis 3, 2, target@got@tprel@h +# CHECK: addis 3, 2, target@got@tprel@l # encoding: [0x3c,0x62,A,A] +# CHECK-NEXT: # fixup A - offset: 2, value: target@got@tprel@l, kind: fixup_ppc_half16 +# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_TPREL16_LO_DS target 0x0 + addis 3, 2, target@got@tprel@l + +# CHECK: addis 3, 2, target@got@tprel # encoding: [0x3c,0x62,A,A] +# CHECK-NEXT: # fixup A - offset: 2, value: target@got@tprel, kind: fixup_ppc_half16 +# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_TPREL16_DS target 0x0 + addis 3, 2, target@got@tprel + # CHECK: ld 1, target@got@tprel(3) # encoding: [0xe8,0x23,A,0bAAAAAA00] # CHECK-NEXT: # fixup A - offset: 2, value: target@got@tprel, kind: fixup_ppc_half16ds # CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_TPREL16_DS target 0x0 @@ -338,6 +348,16 @@ base: # CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_DTPREL16_HI target 0x0 addis 3, 2, target@got@dtprel@h +# CHECK: addis 3, 2, target@got@dtprel@l # encoding: [0x3c,0x62,A,A] +# CHECK-NEXT: # fixup A - offset: 2, value: target@got@dtprel@l, kind: fixup_ppc_half16 +# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_DTPREL16_LO_DS target 0x0 + addis 3, 2, target@got@dtprel@l + +# CHECK: addis 3, 2, target@got@dtprel # encoding: [0x3c,0x62,A,A] +# CHECK-NEXT: # fixup A - offset: 2, value: target@got@dtprel, kind: fixup_ppc_half16 +# CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_DTPREL16_DS target 0x0 + addis 3, 2, target@got@dtprel + # CHECK: ld 1, target@got@dtprel(3) # encoding: [0xe8,0x23,A,0bAAAAAA00] # CHECK-NEXT: # fixup A - offset: 2, value: target@got@dtprel, kind: fixup_ppc_half16ds # CHECK-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_DTPREL16_DS target 0x0 |