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

119 lines
2.7 KiB
YAML

## Ensures that implicitly added sections can be ordered within Sections.
# RUN: yaml2obj --docnum=1 %s -o %t1
# RUN: llvm-readobj --sections %t1 | FileCheck %s --check-prefix=SECTION
# RUN: llvm-nm --dynamic %t1 | FileCheck %s --check-prefix=SYMBOL
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_DYN
Sections:
- Name: .data
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_WRITE ]
DynamicSymbols:
- Name: dynlocal
Type: STT_OBJECT
Section: .data
Binding: STB_LOCAL
- Name: dynglobal
Type: STT_OBJECT
Section: .data
Binding: STB_GLOBAL
- Name: dynweak
Type: STT_OBJECT
Section: .data
Binding: STB_WEAK
# SECTION: Name: .dynsym
# SECTION-NEXT: Type: SHT_DYNSYM
# SECTION-NEXT: Flags
# SECTION-NEXT: SHF_ALLOC
# SECTION: Name: .dynstr
# SECTION-NEXT: Type: SHT_STRTAB
# SECTION-NEXT: Flags
# SECTION-NEXT: SHF_ALLOC
# SYMBOL-DAG: d dynlocal
# SYMBOL-DAG: D dynglobal
# SYMBOL-DAG: V dynweak
## Check we can use numeric values to refer to sections.
# RUN: yaml2obj --docnum=2 -DSEC=0xff %s -o %t2
# RUN: llvm-readobj --dyn-symbols %t2 2>&1 | FileCheck -DFILE=%t2 %s --check-prefix=NUM
# NUM: Name: foo
# NUM: Section:
# NUM-SAME: .data (0x1)
# NUM: Name: bar
# NUM: Section:
# NUM-SAME: .dynsym (0x2)
# NUM: Name: zed1
# NUM: warning: '[[FILE]]': invalid section index: 255
# NUM: Section:
# NUM-SAME: <?> (0xFF)
# NUM: Name: zed2
# NUM: Section:
# NUM-SAME: Undefined (0x0)
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_DYN
Sections:
- Name: .data
Type: SHT_PROGBITS
DynamicSymbols:
- Name: foo
Section: 1
- Name: bar
Section: 2
- Name: zed1
Section: [[SEC=<none>]]
## The case when no "Section" key is set.
- Name: zed2
## Check that by default no section is set.
# RUN: yaml2obj --docnum=2 %s -o %t2.none
# RUN: llvm-readobj --dyn-symbols %t2.none 2>&1 | \
# RUN: FileCheck -DFILE=%t2.none %s --check-prefix=NONE
# NONE: Name: zed1
# NONE: Section:
# NONE-SAME: Undefined (0x0)
# NONE: Name: zed2
# NONE: Section:
# NONE-SAME: Undefined (0x0)
## Check we report errors when unknown sections are referenced by dynamic symbols.
# RUN: not yaml2obj --docnum=3 %s 2>&1 | FileCheck -DFILE=%t3 %s --check-prefix=ERR
# ERR: error: unknown section referenced: '.sec1' by YAML symbol 'foo'
# ERR: error: unknown section referenced: '.sec2' by YAML symbol 'bar'
# ERR: error: unknown section referenced: '' by YAML symbol 'zed'
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_DYN
Sections:
- Name: .data
Type: SHT_PROGBITS
DynamicSymbols:
- Name: foo
Section: .sec1
- Name: bar
Section: .sec2
- Name: zed
Section: ''