Files
TheRock/compiler/amd-llvm/llvm/test/tools/yaml2obj/ELF/dynsym-section.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

81 lines
2.6 KiB
YAML

## Check how we produce SHT_DYNSYM sections.
## Check we do not crash/assert when .dynsym is specified
## explicitly, but .dynstr is not present.
## Check we set the sh_link field to 0 for the .dynsym section in this case.
# RUN: yaml2obj %s -o %t1
# RUN: llvm-readelf --section-headers %t1 | FileCheck %s
# CHECK: Section Headers:
# CHECK-NEXT: [Nr] Name Type Address Off Size ES Flg Lk
# CHECK-NEXT: [ 0] NULL 0000000000000000 000000 000000 00 0 0
# CHECK-NEXT: [ 1] .dynsym DYNSYM 0000000000000000 000040 000018 18 A 0
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_DYN
Sections:
- Name: .dynsym
Type: SHT_DYNSYM
Offset: [[OFFSET=<none>]]
## Check we can use the "Offset" key to to set an arbitrary offset for the SHT_DYNSYM section.
# RUN: yaml2obj %s -DOFFSET=0x100 -o %t2
# RUN: llvm-readelf --section-headers %t2 | FileCheck %s --check-prefix=OFFSET
# OFFSET: Section Headers:
# OFFSET-NEXT: [Nr] Name Type Address Off Size ES Flg Lk Inf Al
# OFFSET-NEXT: [ 0] NULL 0000000000000000 000000 000000 00 0 0 0
# OFFSET-NEXT: [ 1] .dynsym DYNSYM 0000000000000000 000100 000018 18 A 0 1 0
## Check we are able to set Link = 0 for the .dynsym section explicitly.
# RUN: yaml2obj %s --docnum=2 -DLINK=0 -o %t2
# RUN: llvm-readelf --section-headers %t2 | FileCheck %s --check-prefix=LINK-NULL
# LINK-NULL: [Nr] Name {{.*}} Flg Lk Inf
# LINK-NULL: [ 1] .dynsym {{.*}} A 0 1
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_DYN
Sections:
- Name: .dynsym
Type: SHT_DYNSYM
Link: [[LINK=<none>]]
- Name: .dynstr
Type: SHT_STRTAB
- Name: .foo
Type: SHT_PROGBITS
## Check that by default the .dynsym section will be linked to the .dynstr section,
## when the latter one exists.
# RUN: yaml2obj %s --docnum=2 -o %t3
# RUN: llvm-readelf --section-headers %t3 | FileCheck %s --check-prefix=LINK-DEFAULT
# LINK-DEFAULT: [Nr] Name {{.*}} Flg Lk Inf
# LINK-DEFAULT: [ 1] .dynsym {{.*}} A 2 1
# LINK-DEFAULT: [ 2] .dynstr {{.*}} A 0 0
## Even when the .dynstr section exists, we can explicitly link the .dynsym section
## to another section.
# RUN: yaml2obj %s --docnum=2 -DLINK=3 -o %t4
# RUN: llvm-readelf --section-headers %t4 | FileCheck %s --check-prefix=LINK-FOO
# LINK-FOO: [Nr] Name {{.*}} Flg Lk Inf
# LINK-FOO: [ 1] .dynsym {{.*}} A 3 1
# LINK-FOO: [ 3] .foo
## Check we can use a section name as a Link value for .dynsym.
# RUN: yaml2obj %s --docnum=2 -DLINK=.foo -o %t5
# RUN: llvm-readelf --section-headers %t5 | FileCheck %s --check-prefix=LINK-FOO