[libc] Switch to using the generic `<gpuintrin.h>` implementations (#121810)
[llvm-project.git] / lld / test / MachO / rpath.s
blob09ae108b34a217c02e410280e69003bd35e21bbd
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o
3 # RUN: %lld -o %t %t.o
5 ## Check that -rpath generates LC_RPATH.
6 # RUN: %lld -o %t %t.o -rpath /some/rpath -rpath /another/rpath
7 # RUN: llvm-objdump --macho --all-headers %t | FileCheck %s
8 # CHECK: LC_RPATH
9 # CHECK-NEXT: cmdsize 24
10 # CHECK-NEXT: path /some/rpath
11 # CHECK: LC_RPATH
12 # CHECK-NEXT: cmdsize 32
13 # CHECK-NEXT: path /another/rpath
15 ## Check that -rpath entries are deduplicated.
16 # RUN: not %lld %t.o -o /dev/null -rpath /some/rpath -rpath /other/rpath -rpath /some/rpath 2>&1 | \
17 # RUN: FileCheck --check-prefix=FATAL %s
18 # FATAL: error: duplicate -rpath '/some/rpath' ignored [--warn-duplicate-rpath]
20 # RUN: %lld -o %t-dup %t.o -rpath /some/rpath -rpath /other/rpath -rpath /some/rpath --no-warn-duplicate-rpath
21 # RUN: llvm-objdump --macho --all-headers %t-dup | FileCheck %s --check-prefix=DEDUP
22 # DEDUP: LC_RPATH
23 # DEDUP-NEXT: cmdsize 24
24 # DEDUP-NEXT: path /some/rpath
25 # DEDUP: LC_RPATH
26 # DEDUP-NEXT: cmdsize 32
27 # DEDUP-NEXT: path /other/rpath
28 # DEDUP-NOT: LC_RPATH
30 .text
31 .global _main
32 _main:
33 mov $0, %rax
34 ret