Files
TheRock/compiler/amd-llvm/llvm/test/tools/yaml2obj/ELF/override-shoffset.yaml
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

101 lines
2.7 KiB
YAML

## Check we are able to set custom sh_offset field
## for different sections.
# RUN: yaml2obj --docnum=1 %s -o %t1
# RUN: llvm-readelf --sections %t1 | FileCheck %s --check-prefix=CASE1
# CASE1: Section Headers:
# CASE1-NEXT: [Nr] Name Type Address Off
# CASE1-NEXT: [ 0] NULL {{.*}} 000000
# CASE1-NEXT: [ 1] .dynsym DYNSYM {{.*}} 000001
# CASE1-NEXT: [ 2] .symtab SYMTAB {{.*}} 000002
# CASE1-NEXT: [ 3] .dynamic DYNAMIC {{.*}} 000003
# CASE1-NEXT: [ 4] .rela RELA {{.*}} 000004
# CASE1-NEXT: [ 5] .nobits NOBITS {{.*}} 000005
# CASE1-NEXT: [ 6] .group GROUP {{.*}} 000006
# CASE1-NEXT: [ 7] .gnu.version VERSYM {{.*}} 000007
# CASE1-NEXT: [ 8] .gnu.version_r VERNEED {{.*}} 000008
# CASE1-NEXT: [ 9] .gnu.version_d VERDEF {{.*}} 000009
# CASE1-NEXT: [10] .regular PROGBITS {{.*}} 00000a
# CASE1-NEXT: [11] .strtab STRTAB {{.*}} 00000b
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_REL
Sections:
- Name: .dynsym
Type: SHT_DYNSYM
ShOffset: 0x000000001
- Name: .symtab
Type: SHT_SYMTAB
ShOffset: 0x000000002
- Name: .dynamic
Type: SHT_DYNAMIC
ShOffset: 0x000000003
- Name: .rela
Type: SHT_RELA
ShOffset: 0x000000004
- Name: .nobits
Type: SHT_NOBITS
ShOffset: 0x000000005
- Name: .group
Type: SHT_GROUP
ShOffset: 0x000000006
Members:
- Name: .gnu.version
Type: SHT_GNU_versym
Entries: [ ]
ShOffset: 0x000000007
- Name: .gnu.version_r
Type: SHT_GNU_verneed
ShOffset: 0x000000008
Dependencies:
- Name: .gnu.version_d
Type: SHT_GNU_verdef
ShOffset: 0x000000009
Entries:
- Name: .regular
Type: SHT_PROGBITS
ShOffset: 0x00000000A
- Name: .strtab
Type: SHT_STRTAB
ShOffset: 0x00000000B
## Here we check that defining ShOffset does not actually change
## the offset at which section data is placed and also does
## not affect file size.
# RUN: yaml2obj --docnum=2 %s -o %t2
# RUN: yaml2obj --docnum=3 %s -o %t3
# RUN: od -t x1 -v %t2 > %t.txt
# RUN: od -t x1 -v %t3 >> %t.txt
# RUN: FileCheck %s --input-file=%t.txt --ignore-case --check-prefix=CASE2
# CASE2: [[OFFSET:.*]] fe fe fe fe fe fe fe fe
# CASE2: [[FILESIZE:.*]]{{$}}
# CASE2: [[OFFSET]] fe fe fe fe fe fe fe fe
# CASE2: [[FILESIZE]]{{$}}
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_REL
Sections:
- Name: .foo
Type: SHT_PROGBITS
Content: "fefefefefefefefe"
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_REL
Sections:
- Name: .foo
Type: SHT_PROGBITS
ShOffset: 0xFFFF0000
Content: "fefefefefefefefe"