brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · f63b890 Raw
57 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=i686 %s -o %t.o3# RUN: ld.lld %t.o -o %t4# RUN: ld.lld %t.o -pie -o %t.pie5# RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn %t | FileCheck %s --check-prefix=DIS6# RUN: llvm-readobj -r %t | FileCheck %s --check-prefix=RELOC7# RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn %t.pie | FileCheck %s --check-prefix=DIS8# RUN: llvm-readobj -r %t.pie | FileCheck %s --check-prefix=RELOC9 10## Reject local-exec TLS relocations for -shared.11# RUN: not ld.lld -shared %t.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR --implicit-check-not=error:12 13# ERR: error: relocation R_386_TLS_LE_32 against var cannot be used with -shared14# ERR: error: relocation R_386_TLS_LE_32 against var1 cannot be used with -shared15# ERR: error: relocation R_386_TLS_LE against var cannot be used with -shared16# ERR: error: relocation R_386_TLS_LE against var1 cannot be used with -shared17 18.section ".tdata", "awT", @progbits19.globl var20.globl var121var:22.long 023var1:24.long 125 26.section test, "awx"27.global _start28_start:29 movl $var@tpoff, %edx30 movl %gs:0, %ecx31 subl %edx, %eax32 movl $var1@tpoff, %edx33 movl %gs:0, %ecx34 subl %edx, %eax35 36 movl %gs:0, %ecx37 leal var@ntpoff(%ecx), %eax38 movl %gs:0, %ecx39 leal var1@ntpoff+123(%ecx), %eax40 41# DIS:      Disassembly of section test:42# DIS-EMPTY:43# DIS-NEXT: <_start>:44# DIS-NEXT:   movl    $8, %edx45# DIS-NEXT:   movl    %gs:0, %ecx46# DIS-NEXT:   subl    %edx, %eax47# DIS-NEXT:   movl    $4, %edx48# DIS-NEXT:   movl    %gs:0, %ecx49# DIS-NEXT:   subl    %edx, %eax50# DIS-NEXT:   movl    %gs:0, %ecx51# DIS-NEXT:   leal    -8(%ecx), %eax52# DIS-NEXT:   movl    %gs:0, %ecx53# DIS-NEXT:   leal    119(%ecx), %eax54 55# RELOC: Relocations [56# RELOC-NEXT: ]57