Files
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

86 lines
2.5 KiB
Plaintext

# REQUIRES: x86
# Test that mimics a use case of -n to produce a kernel mapped shared-object
# in a non paged context. We specifically want to test:
# - We can allocate the headers into the first program header (via PHDRS)
# typically -n does not allocate headers.
# - The alignment of the .text section is not page aligned.
# RUN: echo ".text; .globl foo; foo: nop" > %t.s
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %t.s -o %t.o
# RUN: ld.lld %t.o -o %t.so --shared --hash-style=sysv --script %s
# RUN: llvm-readobj --program-headers %t.so | FileCheck %s
# RUN: ld.lld %t.o -o %t2.so --shared --hash-style=sysv -n --script %s
# RUN: llvm-readobj --program-headers %t2.so | FileCheck %s --check-prefix=CHECK-N
SECTIONS {
. = 0x0 + SIZEOF_HEADERS;
.hash : { *(.hash) } :text
.dynsym : { *(.dynsym) }
.dynstr : { *(.dynstr) }
. = ALIGN(4);
.text : { *(.text*) }
.dynamic : { *(.dynamic) } :text :dynamic
}
PHDRS {
text PT_LOAD FLAGS(5) FILEHDR PHDRS;
dynamic PT_DYNAMIC FLAGS(4);
}
# CHECK: ProgramHeaders [
# CHECK-NEXT: ProgramHeader {
# CHECK-NEXT: Type: PT_LOAD
# CHECK-NEXT: Offset: 0x0
# CHECK-NEXT: VirtualAddress: 0x0
# CHECK-NEXT: PhysicalAddress: 0x0
# CHECK-NEXT: FileSize:
# CHECK-NEXT: MemSize:
# CHECK-NEXT: Flags [
# CHECK-NEXT: PF_R
# CHECK-NEXT: PF_X
# CHECK-NEXT: ]
# CHECK-NEXT: Alignment: 4096
# CHECK-NEXT: }
# CHECK-NEXT: ProgramHeader {
# CHECK-NEXT: Type: PT_DYNAMIC
# CHECK-NEXT: Offset: 0x108
# CHECK-NEXT: VirtualAddress: 0x108
# CHECK-NEXT: PhysicalAddress: 0x108
# CHECK-NEXT: FileSize:
# CHECK-NEXT: MemSize:
# CHECK-NEXT: Flags [
# CHECK-NEXT: PF_R
# CHECK-NEXT: ]
# CHECK-NEXT: Alignment: 8
# CHECK-NEXT: }
# CHECK-NEXT: ]
# CHECK-N: ProgramHeaders [
# CHECK-N-NEXT: ProgramHeader {
# CHECK-N-NEXT: Type: PT_LOAD
# CHECK-N-NEXT: Offset: 0x0
# CHECK-N-NEXT: VirtualAddress: 0x0
# CHECK-N-NEXT: PhysicalAddress: 0x0
# CHECK-N-NEXT: FileSize: 360
# CHECK-N-NEXT: MemSize: 360
# CHECK-N-NEXT: Flags [
# CHECK-N-NEXT: PF_R
# CHECK-N-NEXT: PF_X
# CHECK-N-NEXT: ]
# CHECK-N-NEXT: Alignment: 8
# CHECK-N-NEXT: }
# CHECK-N-NEXT: ProgramHeader {
# CHECK-N-NEXT: Type: PT_DYNAMIC
# CHECK-N-NEXT: Offset: 0x108
# CHECK-N-NEXT: VirtualAddress: 0x108
# CHECK-N-NEXT: PhysicalAddress: 0x108
# CHECK-N-NEXT: FileSize:
# CHECK-N-NEXT: MemSize:
# CHECK-N-NEXT: Flags [
# CHECK-N-NEXT: PF_R
# CHECK-N-NEXT: ]
# CHECK-N-NEXT: Alignment: 8
# CHECK-N-NEXT: }
# CHECK-N-NEXT: ]