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

67 lines
2.3 KiB
ArmAsm

## Here we simulate an object with more than ~65k sections and check how we dump it.
## When an ELF object has SHN_LORESERVE (0xff00) or more sections, its e_shnum field
## should be zero and sh_size of the section header at index 0 is used
## to store the value. If the section name string table section index is
## greater than or equal to SHN_LORESERVE, then e_shstrndx field
## should have the value of SHN_XINDEX and sh_link of the section header
## at index 0 is used to store the value.
# RUN: yaml2obj --docnum=1 %s -o %t1
# RUN: llvm-readelf --file-headers -S %t1 | FileCheck %s --check-prefix=GNU1
# GNU1: Number of section headers: 0 (3)
# GNU1: Section header string table index: 65535 (2)
# GNU1: There are 3 section headers, starting at offset 0x58
# RUN: llvm-readobj --file-headers %t1 | FileCheck %s --check-prefix=LLVM1
# LLVM1: SectionHeaderCount: 0 (3)
# LLVM1: StringTableSectionIndex: 65535 (2)
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_REL
EShNum: 0
EShStrNdx: 0xffff ## SHN_XINDEX
Sections:
- Type: SHT_NULL
Link: .shstrtab
Size: 0x3
## Another case is when e_shoff field set to zero, but not e_shstrndx.
## We want to show that this corrupt case is handled correctly.
# RUN: yaml2obj --docnum=2 %s -o %t2
# RUN: llvm-readelf --file-headers --sections %t2 2>&1 | \
# RUN: FileCheck %s -DFILE=%t2 --check-prefix=GNU2
# RUN: llvm-readelf --file-headers --section-details %t2 2>&1 | \
# RUN: FileCheck %s -DFILE=%t2 --check-prefix=GNU2
# GNU2: Number of section headers: 0
# GNU2: Section header string table index: 65535 (corrupt: out of range)
# GNU2-EMPTY:
# GNU2: There are no sections in this file.
# GNU2-NEXT: warning: '[[FILE]]': e_shstrndx == SHN_XINDEX, but cannot read section header 0: invalid section index: 0
# RUN: llvm-readobj --file-headers --sections %t2 | \
# RUN: FileCheck %s --check-prefix=LLVM2 --implicit-check-not="warning:"
# LLVM2: SectionHeaderCount: 0
# LLVM2: StringTableSectionIndex: 65535 (corrupt: out of range)
# LLVM2-NEXT: }
# LLVM2-NEXT: Sections [
# LLVM2-NEXT: ]
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_REL
EShOff: 0
EShNum: 0
EShStrNdx: 0xffff ## SHN_XINDEX
Sections:
- Type: SHT_NULL
Link: .shstrtab
Size: 0x3