brintos

brintos / llvm-project-archived public Read only

0
0
Text · 873 B · c3760f1 Raw
31 lines · plain
1# REQUIRES: x862 3# RUN: mkdir -p %t4#5# RUN: llvm-mc -filetype obj -triple x86_64-apple-darwin %p/Inputs/libgoodbye.s -o %t/goodbye.o6# RUN: llvm-ar --format=darwin crs %t/libgoodbye.a %t/goodbye.o7#8# RUN: llvm-mc -filetype obj -triple x86_64-apple-darwin %s -o %t/test.o9# RUN: %lld -o %t/test -L%t -lgoodbye %t/test.o10#11# RUN: llvm-objdump --syms -d -r %t/test | FileCheck %s12 13# CHECK: SYMBOL TABLE:14# CHECK: {{0+}}[[ADDR:[0-9a-f]+]] g     O __TEXT,__cstring _goodbye_world15 16# CHECK: Disassembly of section __TEXT,__text17# CHECK-LABEL: <_main>:18# CHECK: leaq {{.*}}(%rip), %rsi   ## 0x[[ADDR]] <_goodbye_world>19 20.section __TEXT,__text21.global _main22 23_main:24  movl $0x2000004, %eax                 # write()25  mov $1, %rdi                          # stdout26  leaq _goodbye_world(%rip), %rsi27  mov $15, %rdx                         # length28  syscall29  mov $0, %rax30  ret31