brintos

brintos / llvm-project-archived public Read only

0
0
Text · 961 B · cfa5197 Raw
35 lines · plain
1# REQUIRES: x862 3# RUN: rm -rf %t; split-file %s %t4# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/2.s -o %t/2.o5# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/3.s -o %t/3.o6# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/main.s -o %t/main.o7 8# RUN: %lld -arch x86_64 -interposable -lSystem -o %t/main %t/main.o %t/2.o %t/3.o9# RUN: llvm-objdump --macho -d %t/main | FileCheck %s --check-prefix BUNDLE-OBJ10BUNDLE-OBJ-LABEL: _my_user:11BUNDLE-OBJ-NEXT:          callq   [[#%#x,]] ## symbol stub for: _my_friend12 13#--- 2.s14# my_lib: This contains the exported function15.globl _my_friend16_my_friend:17  retq18 19#--- 3.s20# _my_user.s: This is the user/caller of the21#             exported function22.text23_my_user:24  callq _my_friend()25  retq26 27#--- main.s28# main.s: dummy exec/main loads the exported function.29# This is basically a way to say `my_user` should get30# `my_func` from this executable.31.globl _main32.text33 _main:34  retq35