brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · b5ff69a Raw
53 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t13# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux \4# RUN:   %p/Inputs/include.s -o %t25# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux \6# RUN:   %p/Inputs/notinclude.s -o %t3.notinclude7 8# RUN: echo "SECTIONS {} " > %t.script9# RUN: ld.lld -o %t --script %t.script %t1 %t2 %t3.notinclude10# RUN: llvm-objdump --no-print-imm-hex -d %t | FileCheck %s11 12# CHECK: Disassembly of section .text:13# CHECK-EMPTY:14# CHECK: <_start>:15# CHECK-NEXT: :       48 c7 c0 3c 00 00 00    movq    $60, %rax16# CHECK-NEXT: :       48 c7 c7 2a 00 00 00    movq    $42, %rdi17# CHECK-NEXT: :       cc      int318# CHECK-NEXT: :       cc      int319# CHECK: <_potato>:20# CHECK-NEXT: :       90      nop21# CHECK-NEXT: :       90      nop22# CHECK-NEXT: :       cc      int323# CHECK-NEXT: :       cc      int324# CHECK: <tomato>:25# CHECK-NEXT: :       b8 01 00 00 00  movl    $1, %eax26 27# RUN: echo "SECTIONS { .patatino : \28# RUN: { KEEP(*(EXCLUDE_FILE(*notinclude) .text)) } }" \29# RUN:  > %t.script30# RUN: ld.lld -o %t4 --script %t.script %t1 %t2 %t3.notinclude31# RUN: llvm-objdump --no-print-imm-hex -d %t4 | FileCheck %s --check-prefix=EXCLUDE32 33# EXCLUDE: Disassembly of section .patatino:34# EXCLUDE-EMPTY:35# EXCLUDE: <_start>:36# EXCLUDE-NEXT: :       48 c7 c0 3c 00 00 00    movq    $60, %rax37# EXCLUDE-NEXT: :       48 c7 c7 2a 00 00 00    movq    $42, %rdi38# EXCLUDE-NEXT: :       cc      int339# EXCLUDE-NEXT: :       cc      int340# EXCLUDE: <_potato>:41# EXCLUDE-NEXT: :       90      nop42# EXCLUDE-NEXT: :       90      nop43# EXCLUDE: Disassembly of section .text:44# EXCLUDE-EMPTY:45# EXCLUDE: <tomato>:46# EXCLUDE-NEXT: :       b8 01 00 00 00  movl    $1, %eax47 48.section .text49.globl _start50_start:51    mov $60, %rax52    mov $42, %rdi53