Files
TheRock/compiler/amd-llvm/lld/test/ELF/ppc32-relocatable-got2.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

48 lines
1.4 KiB
ArmAsm

# REQUIRES: ppc
## Test addend adjustment of R_PPC_PLTREL24 when copying relocations.
## If r_addend indicates .got2, adjust it by the local .got2's output section offset.
# RUN: llvm-mc -filetype=obj -triple=powerpc %s -o %t.o
# RUN: echo 'bl f+0x8000@plt' | llvm-mc -filetype=obj -triple=powerpc - -o %t2.o
# RUN: ld.lld -r %t.o %t.o %t2.o -o %t
# RUN: llvm-readobj -r %t | FileCheck %s
# RUN: ld.lld -shared --emit-relocs %t.o %t.o %t2.o -o %t.so
# RUN: llvm-readobj -r %t.so | FileCheck %s
# CHECK: .rela.adjust {
# CHECK-NEXT: R_PPC_REL16_HA .got2 0x8002
# CHECK-NEXT: R_PPC_REL16_LO .got2 0x8006
# CHECK-NEXT: R_PPC_PLTREL24 foo 0x8000
# CHECK-NEXT: R_PPC_PLTREL24 bar 0x8000
# CHECK-NEXT: R_PPC_REL16_HA .got2 0x8006
# CHECK-NEXT: R_PPC_REL16_LO .got2 0x800A
# CHECK-NEXT: R_PPC_PLTREL24 foo 0x8004
# CHECK-NEXT: R_PPC_PLTREL24 bar 0x8004
# CHECK-NEXT: }
# CHECK-NEXT: .rela.no_adjust {
# CHECK-NEXT: R_PPC_PLTREL24 foo 0x0
# CHECK-NEXT: R_PPC_PLTREL24 foo 0x0
# CHECK-NEXT: }
## %t2.o has an invalid relocation with r_addend=0x8000. Test we don't crash.
## The addend doesn't matter.
# CHECK-NEXT: .rela.text {
# CHECK-NEXT: R_PPC_PLTREL24 f 0x8000
# CHECK-NEXT: }
.section .got2,"aw"
.long 0
.section .adjust,"ax"
bcl 20,30,.L0
.L0:
addis 30,30,.got2+0x8000-.L0@ha
addi 30,30,.got2+0x8000-.L0@l
## Refers to .got2+addend, adjust.
bl foo+0x8000@plt
bl bar+0x8000@plt
.section .no_adjust,"ax"
## Refers to .got, no adjustment.
bl foo@plt