40 lines · plain
1# REQUIRES: x862# RUN: rm -rf %t; split-file %s %t3 4## Check that data-in-code information is sorted even if5## sections are reordered compared to the input order.6 7# RUN: sed -e s/SYM/_first/ %t/input.s | \8# RUN: llvm-mc -filetype=obj --triple=x86_64-apple-darwin -o %t/first.o9# RUN: sed -e s/SYM/_second/ %t/input.s | \10# RUN: llvm-mc -filetype=obj --triple=x86_64-apple-darwin -o %t/second.o11# RUN: sed -e s/SYM/_third/ %t/input.s | \12# RUN: llvm-mc -filetype=obj --triple=x86_64-apple-darwin -o %t/third.o13# RUN: %lld -dylib -lSystem -order_file %t/order.txt %t/first.o %t/second.o %t/third.o -o %t/out14# RUN: llvm-objdump --macho --syms %t/out > %t/dump.txt15# RUN: llvm-objdump --macho --data-in-code %t/out >> %t/dump.txt16# RUN: FileCheck %s < %t/dump.txt17 18# CHECK-LABEL: SYMBOL TABLE:19# CHECK-DAG: [[#%x, SECOND:]] g F __TEXT,__text _second20# CHECK-DAG: [[#%x, FIRST:]] g F __TEXT,__text _first21# CHECK-DAG: [[#%x, THIRD:]] g F __TEXT,__text _third22 23# CHECK-LABEL: Data in code table (3 entries)24# CHECK-NEXT: offset length kind25# CHECK-NEXT: 0x[[#%.8x, SECOND]] 4 JUMP_TABLE3226# CHECK-NEXT: 0x[[#%.8x, FIRST]] 4 JUMP_TABLE3227# CHECK-NEXT: 0x[[#%.8x, THIRD]] 4 JUMP_TABLE3228 29#--- order.txt30_second31_first32_third33 34#--- input.s35.globl SYM36SYM:37.data_region jt3238.long 039.end_data_region40