Files
TheRock/compiler/amd-llvm/lld/test/MachO/link-search-at-loader-path-symlink.s
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

60 lines
2.0 KiB
ArmAsm

# REQUIRES: x86
# Windows does not support rpath
# UNSUPPORTED: system-windows
# RUN: rm -rf %t; split-file %s %t
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/foo.s -o %t/foo.o
# RUN: llvm-mc -filetype obj -triple x86_64-apple-darwin %t/bar.s -o %t/bar.o
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/test.s -o %t/test.o
## 1. Test symlink with reexport to @rpath and rpath pointing to @loader_path.
## The @loader_path-relative path is looked after resolving the symlink.
# RUN: mkdir -p %t/Foo1.framework/Versions/A
# RUN: %lld -dylib -install_name @rpath/libbar1.dylib %t/bar.o -o %t/Foo1.framework/Versions/A/libbar1.dylib
# RUN: %lld -dylib -install_name %t/Foo1.framework/Versions/A/Foo1 %t/foo.o \
# RUN: -reexport_library %t/Foo1.framework/Versions/A/libbar1.dylib \
# RUN: -rpath @loader_path/. \
# RUN: -o %t/Foo1.framework/Versions/A/Foo1
# RUN: ln -sf A %t/Foo1.framework/Versions/Current
# RUN: ln -sf Versions/Current/Foo1 %t/Foo1.framework/Foo1
# RUN: %lld -lSystem -F%t -framework Foo1 %t/test.o -o %t/test1
## 2. Test symlink with reexport to @loader_path-relative path directly.
## The @loader_path-relative path is looked after resolving the symlink.
## ld64 gets this wrong -- it calls realpath() but ignores the result.
## (ld64-609, Options.cpp, Options::findFile(), "@loader_path/" handling.)
# RUN: mkdir -p %t/Foo2.framework/Versions/A
# RUN: %lld -dylib -install_name @loader_path/libbar2.dylib %t/bar.o -o %t/Foo2.framework/Versions/A/libbar2.dylib
# RUN: %lld -dylib -install_name %t/Foo2.framework/Versions/A/Foo2 %t/foo.o \
# RUN: -reexport_library %t/Foo2.framework/Versions/A/libbar2.dylib \
# RUN: -o %t/Foo2.framework/Versions/A/Foo2
# RUN: ln -sf A %t/Foo2.framework/Versions/Current
# RUN: ln -sf Versions/Current/Foo2 %t/Foo2.framework/Foo2
# RUN: %lld -lSystem -F%t -framework Foo2 %t/test.o -o %t/test2
#--- foo.s
.globl _foo
_foo:
ret
#--- bar.s
.globl _bar
_bar:
ret
#--- test.s
.globl _main
.text
_main:
callq _foo
callq _bar
ret