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
105 lines
3.2 KiB
ArmAsm
105 lines
3.2 KiB
ArmAsm
# REQUIRES: hexagon
|
|
# RUN: echo '.globl bar, weak; .type bar,@function; .type weak,@function; bar: weak:' > %t1.s
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=hexagon-unknown-elf %t1.s -o %t1.o
|
|
# RUN: ld.lld -shared %t1.o -soname=t1.so -o %t1.so
|
|
# RUN: llvm-mc -mno-fixup -filetype=obj -triple=hexagon-unknown-elf %s -o %t.o
|
|
# RUN: ld.lld %t.o %t1.so -z separate-code -o %t
|
|
# RUN: llvm-readelf -S -s %t | FileCheck --check-prefixes=SEC,NM %s
|
|
# RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s
|
|
# RUN: llvm-readelf -x .got.plt %t | FileCheck --check-prefix=GOTPLT %s
|
|
# RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn %t | FileCheck --check-prefixes=DIS %s
|
|
|
|
# SEC: .plt PROGBITS {{0*}}00020040
|
|
|
|
## A canonical PLT has a non-zero st_value. bar and weak are called but their
|
|
## addresses are not taken, so a canonical PLT is not necessary.
|
|
# NM: {{0*}}00000000 0 FUNC GLOBAL DEFAULT UND bar
|
|
# NM: {{0*}}00000000 0 FUNC WEAK DEFAULT UND weak
|
|
|
|
## The .got.plt slots relocated by .rela.plt point to .plt
|
|
## This is required by glibc.
|
|
# RELOC: .rela.plt {
|
|
# RELOC-NEXT: 0x40078 R_HEX_JMP_SLOT bar 0x0
|
|
# RELOC-NEXT: 0x4007C R_HEX_JMP_SLOT weak 0x0
|
|
# RELOC-NEXT: }
|
|
# GOTPLT: section '.got.plt'
|
|
# GOTPLT-NEXT: 0x00040068 00000000 00000000 00000000 00000000
|
|
# GOTPLT-NEXT: 0x00040078 00000000 00000000
|
|
|
|
# DIS: <_start>:
|
|
## Direct call
|
|
## Call foo directly
|
|
# DIS-NEXT: { call 0x2003c <foo> }
|
|
## Call bar via plt
|
|
# DIS-NEXT: { call 0x20060 <bar@plt> }
|
|
## Call weak via plt
|
|
# DIS-NEXT: { call 0x20070 <weak@plt> }
|
|
# DIS-NEXT: { immext(#0)
|
|
|
|
## Call foo directly
|
|
# DIS-NEXT: if (p0) jump:nt 0x2003c <foo> }
|
|
# DIS-NEXT: { immext(#64)
|
|
## Call bar via plt
|
|
# DIS-NEXT: if (p0) jump:nt 0x20060 <bar@plt> }
|
|
# DIS-NEXT: { immext(#64)
|
|
## Call weak via plt
|
|
# DIS-NEXT: if (p0) jump:nt 0x20070 <weak@plt> }
|
|
# DIS-NEXT: { immext(#0)
|
|
|
|
## Call foo directly
|
|
# DIS-NEXT: r0 = #0 ; jump 0x2003c <foo> }
|
|
# DIS-NEXT: { immext(#0)
|
|
## Call bar via plt
|
|
# DIS-NEXT: r0 = #0 ; jump 0x20060 <bar@plt> }
|
|
# DIS-NEXT: { immext(#0)
|
|
## Call weak via plt
|
|
# DIS-NEXT: r0 = #0 ; jump 0x20070 <weak@plt> }
|
|
|
|
# DIS: <foo>:
|
|
# DIS-NEXT: 2003c:
|
|
|
|
|
|
# DIS: Disassembly of section .plt:
|
|
|
|
# DIS: 00020040 <.plt>:
|
|
# DIS-NEXT: 20040: { immext(#131072)
|
|
# DIS-NEXT: 20044: r28 = add(pc,##131112) }
|
|
# DIS-NEXT: 20048: { r14 -= add(r28,#16)
|
|
# DIS-NEXT: 2004c: r15 = memw(r28+#8)
|
|
# DIS-NEXT: 20050: r28 = memw(r28+#4) }
|
|
# DIS-NEXT: 20054: { r14 = asr(r14,#2)
|
|
# DIS-NEXT: 20058: jumpr r28 }
|
|
# DIS-NEXT: 2005c: { trap0(#219) }
|
|
# DIS-EMPTY:
|
|
# DIS-NEXT: 00020060 <bar@plt>:
|
|
# DIS-NEXT: 20060: { immext(#131072)
|
|
# DIS-NEXT: 20064: r14 = add(pc,##131096) }
|
|
# DIS-NEXT: 20068: { r28 = memw(r14+#0) }
|
|
# DIS-NEXT: 2006c: { jumpr r28 }
|
|
# DIS-EMPTY:
|
|
# DIS-NEXT: 00020070 <weak@plt>:
|
|
# DIS-NEXT: 20070: { immext(#131072)
|
|
# DIS-NEXT: 20074: r14 = add(pc,##131084) }
|
|
# DIS-NEXT: 20078: { r28 = memw(r14+#0) }
|
|
# DIS-NEXT: 2007c: { jumpr r28 }
|
|
|
|
|
|
.global _start, foo, bar
|
|
.weak weak
|
|
|
|
_start:
|
|
call foo
|
|
call bar
|
|
call weak
|
|
if (p0) jump foo
|
|
if (p0) jump bar
|
|
if (p0) jump weak
|
|
{ r0 = #0; jump foo }
|
|
{ r0 = #0; jump bar }
|
|
{ r0 = #0; jump weak }
|
|
|
|
## foo is local and non-preemptale, no PLT is generated.
|
|
foo:
|
|
jumpr r31
|