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
98 lines
3.7 KiB
ArmAsm
98 lines
3.7 KiB
ArmAsm
# REQUIRES: x86
|
|
# RUN: rm -rf %t; split-file %s %t
|
|
# RUN: mkdir -p %t/bin
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t/weak.o %t/weak.s
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t/strong_a.o %t/strong_a.s
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t/strong_b.o %t/strong_b.s
|
|
|
|
# --- Test Case 1: No overrides
|
|
# RUN: %lld %t/weak.o -o %t/bin/alone -e _s
|
|
# RUN: llvm-nm -am %t/bin/alone | FileCheck --check-prefix=NM_ALONE %s
|
|
|
|
# NM_ALONE: [[#%x, P_ADDR:]] (__TEXT,__const) weak external _placeholder_int
|
|
# NM_ALONE: [[#P_ADDR]] (__TEXT,__const) weak external _weak_a
|
|
# NM_ALONE: [[#P_ADDR]] (__TEXT,__const) weak external _weak_b
|
|
|
|
# --- Test Case 2: Override weak_a
|
|
# RUN: %lld %t/weak.o %t/strong_a.o -o %t/bin/with_a -e _s
|
|
# RUN: llvm-nm -am %t/bin/with_a | FileCheck --check-prefix=NM_WITH_A %s
|
|
# RUN: llvm-nm -am %t/bin/with_a | FileCheck --check-prefix=NM_WITH_A_BAD %s
|
|
|
|
# NM_WITH_A: [[#%x, P_ADDR:]] (__TEXT,__const) weak external _placeholder_int
|
|
# NM_WITH_A: [[#%x, A_ADDR:]] (__TEXT,__const) external _strong_a
|
|
# NM_WITH_A: [[#A_ADDR]] (__TEXT,__const) external _weak_a
|
|
# NM_WITH_A: [[#P_ADDR]] (__TEXT,__const) weak external _weak_b
|
|
|
|
# --- Addresses of _placeholder_int and _strong_a must not match.
|
|
# NM_WITH_A_BAD: [[#%x, P_ADDR:]] (__TEXT,__const) weak external _placeholder_int
|
|
# NM_WITH_A_BAD-NOT: [[#P_ADDR]] (__TEXT,__const) external _strong_a
|
|
|
|
# --- Test Case 3: Override weak_b
|
|
# RUN: %lld %t/weak.o %t/strong_b.o -o %t/bin/with_b -e _s
|
|
# RUN: llvm-nm -am %t/bin/with_b | FileCheck --check-prefix=NM_WITH_B %s
|
|
# RUN: llvm-nm -am %t/bin/with_b | FileCheck --check-prefix=NM_WITH_B_BAD %s
|
|
|
|
# NM_WITH_B: [[#%x, P_ADDR:]] (__TEXT,__const) weak external _placeholder_int
|
|
# NM_WITH_B: [[#%x, B_ADDR:]] (__TEXT,__const) external _strong_b
|
|
# NM_WITH_B: [[#P_ADDR]] (__TEXT,__const) weak external _weak_a
|
|
# NM_WITH_B: [[#B_ADDR]] (__TEXT,__const) external _weak_b
|
|
|
|
# --- Addresses of _placeholder_int and _strong_a must not match.
|
|
# NM_WITH_B_BAD: [[#%x, P_ADDR:]] (__TEXT,__const) weak external _placeholder_int
|
|
# NM_WITH_B_BAD-NOT: [[#P_ADDR]] (__TEXT,__const) external _strong_b
|
|
|
|
# --- Test Case 4: Override weak_a and weak_b
|
|
# RUN: %lld %t/weak.o %t/strong_a.o %t/strong_b.o -o %t/bin/with_ab -e _s
|
|
# RUN: llvm-nm -am %t/bin/with_ab | FileCheck --check-prefix=NM_WITH_AB %s
|
|
# RUN: llvm-nm -am %t/bin/with_ab | FileCheck --check-prefix=NM_WITH_AB_BAD %s
|
|
|
|
# NM_WITH_AB: [[#%x, P_ADDR:]] (__TEXT,__const) weak external _placeholder_int
|
|
# NM_WITH_AB: [[#%x, A_ADDR:]] (__TEXT,__const) external _strong_a
|
|
# NM_WITH_AB: [[#%x, B_ADDR:]] (__TEXT,__const) external _strong_b
|
|
# NM_WITH_AB: [[#A_ADDR]] (__TEXT,__const) external _weak_a
|
|
# NM_WITH_AB: [[#B_ADDR]] (__TEXT,__const) external _weak_b
|
|
|
|
# --- Addresses of _placeholder_int, _strong_a, and _strong_b must all be distinct
|
|
# NM_WITH_AB_BAD: [[#%x, P_ADDR:]] (__TEXT,__const) weak external _placeholder_int
|
|
# NM_WITH_AB_BAD-NOT: [[#P_ADDR]] (__TEXT,__const) external _strong_a
|
|
# NM_WITH_AB_BAD-NOT: [[#P_ADDR]] (__TEXT,__const) external _strong_b
|
|
|
|
#--- weak.s
|
|
.section __TEXT,__const
|
|
.globl _placeholder_int
|
|
.weak_definition _placeholder_int
|
|
_placeholder_int:
|
|
.long 0
|
|
|
|
.globl _weak_a
|
|
.set _weak_a, _placeholder_int
|
|
.weak_definition _weak_a
|
|
|
|
.globl _weak_b
|
|
.set _weak_b, _placeholder_int
|
|
.weak_definition _weak_b
|
|
|
|
.globl _s
|
|
_s:
|
|
.quad _weak_a
|
|
.quad _weak_b
|
|
|
|
#--- strong_a.s
|
|
.section __TEXT,__const
|
|
.globl _strong_a
|
|
_strong_a:
|
|
.long 1
|
|
|
|
.globl _weak_a
|
|
_weak_a = _strong_a
|
|
|
|
#--- strong_b.s
|
|
.section __TEXT,__const
|
|
.globl _strong_b
|
|
_strong_b:
|
|
.long 2
|
|
|
|
.globl _weak_b
|
|
_weak_b = _strong_b
|