54 lines · plain
1## Check that llvm-objcopy preserves AArch64 mapping symbols for relocatable files.2# RUN: yaml2obj %s -o %t.o -DTYPE=REL3# RUN: llvm-objcopy --strip-unneeded %t.o %t1.o4# RUN: llvm-nm -j --special-syms %t1.o | FileCheck %s --match-full-lines5# RUN: llvm-objcopy --discard-all %t.o %t2.o6# RUN: llvm-nm -j --special-syms %t2.o | FileCheck %s --match-full-lines7 8# CHECK: $d9# CHECK-NEXT: $d.d10# CHECK-NEXT: $x11# CHECK-NEXT: $x.x12 13## A mapping symbol can be deleted if specified explicitly.14# RUN: llvm-objcopy -w -N '$d*' %t.o %t3.o15# RUN: llvm-nm --special-syms %t3.o | FileCheck /dev/null --implicit-check-not='$d'16 17## Mapping symbols are not preserved for executable files18# RUN: yaml2obj %s -o %t.exec -DTYPE=EXEC19# RUN: llvm-objcopy --strip-unneeded %t.exec %t1.exec20# RUN: llvm-nm --special-syms %t1.exec | count 021 22# RUN: yaml2obj %s -o %t.so -DTYPE=DYN23# RUN: llvm-objcopy --strip-unneeded %t.so %t1.so24# RUN: llvm-nm --special-syms %t1.so | count 025 26!ELF27FileHeader:28 Class: ELFCLASS6429 Data: ELFDATA2LSB30 Type: ET_[[TYPE]]31 Machine: EM_AARCH6432Sections:33 - Name: .text34 Type: SHT_PROGBITS35Symbols:36 - Name: $a37 Section: .text38 - Name: $d39 Section: .text40 - Name: $dd41 Section: .text42 - Name: $d.d43 Section: .text44 - Name: $m45 Section: .text46 - Name: $t.t47 Section: .text48 - Name: $x49 Section: .text50 - Name: $xx51 Section: .text52 - Name: $x.x53 Section: .text54