Files
TheRock/compiler/amd-llvm/lld/test/MachO/reloc-subtractor.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

75 lines
2.0 KiB
ArmAsm

# REQUIRES: x86, aarch64
# RUN: rm -rf %t; split-file %s %t
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/test.s -o %t/x86_64.o
# RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %t/test.s -o %t/arm64.o
# RUN: %lld -lSystem %t/x86_64.o -o %t/x86_64 -order_file %t/order-file
# RUN: llvm-objdump --syms --full-contents --rebase %t/x86_64 | FileCheck %s
# RUN: %lld -arch arm64 -lSystem %t/arm64.o -o %t/arm64 -order_file %t/order-file
# RUN: llvm-objdump --syms --full-contents --rebase %t/arm64 | FileCheck %s
# CHECK-LABEL: SYMBOL TABLE:
# CHECK: {{0*}}[[#%x, SUB1ADDR:]] l {{.*}} __DATA,bar _sub1
# CHECK: {{0*}}[[#%x, SUB2ADDR:]] l {{.*}} __DATA,bar _sub2
# CHECK: {{0*}}[[#%x, SUB3ADDR:]] l {{.*}} __DATA,bar _sub3
# CHECK: {{0*}}[[#%x, SUB4ADDR:]] l {{.*}} __DATA,bar _sub4
# CHECK: {{0*}}[[#%x, SUB5ADDR:]] l {{.*}} __DATA,bar _sub5
# CHECK-LABEL: Contents of section __DATA,bar:
# CHECK: [[#SUB1ADDR]] 10000000
# CHECK-NEXT: [[#SUB2ADDR]] f2ffffff
# CHECK-NEXT: [[#SUB3ADDR]] 14000000 00000000
# CHECK-NEXT: [[#SUB4ADDR]] f6ffffff ffffffff
# CHECK-NEXT: [[#SUB5ADDR]] f1ffffff ffffffff
# CHECK: Rebase table:
# CHECK-NEXT: segment section address type
# CHECK-EMPTY:
#--- test.s
.globl _main, _subtrahend_1, _subtrahend_2, _minuend1, _minuend2
.section __DATA,foo
.space 16
L_.minuend:
.space 16
.section __DATA,bar
_sub1:
.long _minuend_1 - _subtrahend_1
.space 12
_sub2:
.long _minuend_2 - _subtrahend_2 + 2
.space 12
_sub3:
.quad _minuend_1 - _subtrahend_1 + 4
.space 8
_sub4:
.quad _minuend_2 - _subtrahend_2 + 6
.space 8
_sub5:
.quad L_.minuend - _subtrahend_1 + 1
.space 8
_minuend_1:
.space 16
_minuend_2:
.space 16
_subtrahend_1:
.space 16
_subtrahend_2:
.space 16
.text
.p2align 2
_main:
ret
.subsections_via_symbols
#--- order-file
## Reorder the symbols to make sure that the addends are being associated with
## the minuend (and not the subtrahend) relocation.
_subtrahend_1
_minuend_1
_minuend_2
_subtrahend_2