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
78 lines
2.6 KiB
ArmAsm
78 lines
2.6 KiB
ArmAsm
// REQUIRES: x86
|
|
|
|
/// Test -z ifunc-noplt.
|
|
|
|
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-freebsd %S/Inputs/shared2-x86-64.s -o %t1.o
|
|
// RUN: ld.lld %t1.o --shared -soname=so -o %t.so
|
|
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-freebsd %s -o %t.o
|
|
|
|
/// The default -z text is not compatible with -z ifunc-noplt.
|
|
// RUN: not ld.lld -z ifunc-noplt %t.o -o /dev/null 2>&1| FileCheck --check-prefix=INCOMPATIBLE %s
|
|
// RUN: not ld.lld -z ifunc-noplt -z text %t.o -o /dev/null 2>&1| FileCheck --check-prefix=INCOMPATIBLE %s
|
|
// INCOMPATIBLE: -z text and -z ifunc-noplt may not be used together
|
|
|
|
// RUN: ld.lld -z ifunc-noplt -z notext --hash-style=sysv %t.so %t.o -o %tout
|
|
// RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn %tout | FileCheck %s --check-prefix=DISASM
|
|
// RUN: llvm-readobj -r --dynamic-table %tout | FileCheck %s
|
|
|
|
// Check that we emitted relocations for the ifunc calls
|
|
// CHECK: Relocations [
|
|
// CHECK-NEXT: Section (4) .rela.dyn {
|
|
// CHECK-NEXT: 0x201323 R_X86_64_PLT32 foo 0xFFFFFFFFFFFFFFFC
|
|
// CHECK-NEXT: 0x201328 R_X86_64_PLT32 bar 0xFFFFFFFFFFFFFFFC
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: Section (5) .rela.plt {
|
|
// CHECK-NEXT: 0x203498 R_X86_64_JUMP_SLOT bar2 0x0
|
|
// CHECK-NEXT: 0x2034A0 R_X86_64_JUMP_SLOT zed2 0x0
|
|
// CHECK-NEXT: }
|
|
|
|
// Check that ifunc call sites still require relocation
|
|
// DISASM: Disassembly of section .text:
|
|
// DISASM-EMPTY:
|
|
// DISASM-NEXT: 0000000000201320 <foo>:
|
|
// DISASM-NEXT: 201320: retq
|
|
// DISASM-EMPTY:
|
|
// DISASM-NEXT: 0000000000201321 <bar>:
|
|
// DISASM-NEXT: 201321: retq
|
|
// DISASM-EMPTY:
|
|
// DISASM-NEXT: 0000000000201322 <_start>:
|
|
// DISASM-NEXT: 201322: callq 0x201327 <_start+0x5>
|
|
// DISASM-NEXT: 201327: callq 0x20132c <_start+0xa>
|
|
// DISASM-NEXT: 20132c: callq 0x201350 <bar2@plt>
|
|
// DISASM-NEXT: 201331: callq 0x201360 <zed2@plt>
|
|
// DISASM-EMPTY:
|
|
// DISASM-NEXT: Disassembly of section .plt:
|
|
// DISASM-EMPTY:
|
|
// DISASM-NEXT: 0000000000201340 <.plt>:
|
|
// DISASM-NEXT: 201340: pushq 8514(%rip)
|
|
// DISASM-NEXT: 201346: jmpq *8516(%rip)
|
|
// DISASM-NEXT: 20134c: nopl (%rax)
|
|
// DISASM-EMPTY:
|
|
// DISASM-NEXT: 0000000000201350 <bar2@plt>:
|
|
// DISASM-NEXT: 201350: jmpq *8514(%rip)
|
|
// DISASM-NEXT: 201356: pushq $0
|
|
// DISASM-NEXT: 20135b: jmp 0x201340 <.plt>
|
|
// DISASM-EMPTY:
|
|
// DISASM-NEXT: 0000000000201360 <zed2@plt>:
|
|
// DISASM-NEXT: 201360: jmpq *8506(%rip)
|
|
// DISASM-NEXT: 201366: pushq $1
|
|
// DISASM-NEXT: 20136b: jmp 0x201340 <.plt>
|
|
|
|
.text
|
|
.type foo STT_GNU_IFUNC
|
|
.globl foo
|
|
foo:
|
|
ret
|
|
|
|
.type bar STT_GNU_IFUNC
|
|
.globl bar
|
|
bar:
|
|
ret
|
|
|
|
.globl _start
|
|
_start:
|
|
call foo
|
|
call bar
|
|
call bar2
|
|
call zed2
|