1# REQUIRES: x86 2 3# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o 4# RUN: ld.lld %t.o -o %t1 5#RUN: llvm-objdump --section-headers %t1 | FileCheck %s --check-prefix BEFORE 6#BEFORE: .symtab 7#BEFORE-NEXT: .shstrtab 8#BEFORE-NEXT: .strtab 9 10#RUN: ld.lld %t.o --strip-all -o %t1 11#RUN: llvm-objdump --section-headers %t1 | FileCheck %s --check-prefix AFTER 12#AFTER-NOT: .symtab 13#AFTER: .shstrtab 14#AFTER-NOT: .strtab 15 16# Ignore --strip-all if -r is specified 17#RUN: ld.lld %t.o --strip-all -r -o %t1 18#RUN: llvm-objdump --section-headers %t1 | FileCheck %s --check-prefix BEFORE 19 20# Test alias -s 21#RUN: ld.lld %t.o -s -o %t1 22#RUN: llvm-objdump --section-headers %t1 | FileCheck %s --check-prefix AFTER 23 24# RUN: not ld.lld %t.o --strip-all --emit-relocs -o /dev/null 2>&1 | FileCheck --check-prefix=ERR %s 25# ERR: error: --strip-all and --emit-relocs may not be used together 26 27# exits with return code 42 on linux 28.globl _start 29_start: 30 mov $60, %rax 31 mov $42, %rdi 32 syscall 33