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

126 lines
4.3 KiB
YAML

## Test how we dump the .debug_str section.
## a) Test dumping a .debug_str section with a default section header.
# RUN: yaml2obj --docnum=1 %s | obj2yaml | \
# RUN: FileCheck %s --check-prefix=BASIC --implicit-check-not='Name: .debug_str'
## b) Test dumping a .debug_str section whose section header properties are overridden.
## Override the sh_type field.
# RUN: yaml2obj --docnum=1 -DTYPE=STRTAB %s | obj2yaml | \
# RUN: FileCheck %s --check-prefixes=BASIC,COMMON \
# RUN: -DTYPE=STRTAB -DFLAGS="[ SHF_MERGE, SHF_STRINGS ]" -D#%x,ADDRALIGN=1
## Override the sh_flags field.
# RUN: yaml2obj --docnum=1 -DFLAGS=[SHF_ALLOC] %s | obj2yaml | \
# RUN: FileCheck %s --check-prefixes=BASIC,COMMON \
# RUN: -DTYPE=PROGBITS -DFLAGS="[ SHF_ALLOC ]" -D#%x,ADDRALIGN=1
## Override the sh_link field.
# RUN: yaml2obj --docnum=1 -DLINK=.sec %s | obj2yaml | \
# RUN: FileCheck %s --check-prefixes=BASIC,COMMON,LINK \
# RUN: -DTYPE=PROGBITS -DFLAGS="[ SHF_MERGE, SHF_STRINGS ]" -DLINK=.sec -D#%x,ADDRALIGN=1
## Override the sh_addr field.
# RUN: yaml2obj --docnum=1 -DADDRESS=0x2020 %s | obj2yaml | \
# RUN: FileCheck %s --check-prefixes=BASIC,COMMON,ADDRESS \
# RUN: -DTYPE=PROGBITS -DFLAGS="[ SHF_MERGE, SHF_STRINGS ]" -D#%x,ADDRALIGN=1 -D#%x,ADDRESS=0x2020
## Override the sh_addralign field.
# RUN: yaml2obj --docnum=1 -DADDRALIGN=3 %s | obj2yaml | \
# RUN: FileCheck %s --check-prefixes=BASIC,COMMON \
# RUN: -DTYPE=PROGBITS -DFLAGS="[ SHF_MERGE, SHF_STRINGS ]" -D#%x,ADDRALIGN=3
## Override the sh_entsize field (sh_entsize=3).
# RUN: yaml2obj --docnum=1 -DENTSIZE=3 %s | obj2yaml | \
# RUN: FileCheck %s --check-prefixes=BASIC,COMMON,ENTSIZE \
# RUN: -DTYPE=PROGBITS -DFLAGS="[ SHF_MERGE, SHF_STRINGS ]" -D#%x,ADDRALIGN=1 -D#%x,ENTSIZE=3
## Override the sh_entsize field (sh_entsize=0).
# RUN: yaml2obj --docnum=1 -DENTSIZE=0 %s | obj2yaml | \
# RUN: FileCheck %s --check-prefixes=BASIC,COMMON,ENTSIZE \
# RUN: -DTYPE=PROGBITS -DFLAGS="[ SHF_MERGE, SHF_STRINGS ]" -D#%x,ADDRALIGN=1 -D#%x,ENTSIZE=0
## Override the sh_info field.
# RUN: yaml2obj --docnum=1 -DINFO=3 %s | obj2yaml | \
# RUN: FileCheck %s --check-prefixes=BASIC,COMMON,INFO \
# RUN: -DTYPE=PROGBITS -DFLAGS="[ SHF_MERGE, SHF_STRINGS ]" -D#%x,INFO=3 -D#%x,ADDRALIGN=1 -D#%x,ENTSIZE=1
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_EXEC
Sections:
- Name: .debug_str
Type: SHT_[[TYPE=PROGBITS]]
Flags: [[FLAGS=<none>]]
Link: [[LINK=<none>]]
EntSize: [[ENTSIZE=1]]
Info: [[INFO=<none>]]
AddressAlign: [[ADDRALIGN=1]]
Address: [[ADDRESS=<none>]]
- Name: .sec
Type: SHT_PROGBITS
DWARF:
debug_str:
- a
- b
- abc
# COMMON: - Name: .debug_str
# COMMON-NEXT: Type: SHT_[[TYPE]]
# COMMON-NEXT: Flags: [[FLAGS]]
# LINK-NEXT: Link: .sec
# ADDRESS-NEXT: Address: 0x[[#%x,ADDRESS]]
# COMMON-NEXT: AddressAlign: 0x[[#%x,ADDRALIGN]]
# ENTSIZE-NEXT: EntSize: 0x[[#%x,ENTSIZE]]
# INFO-NEXT: Info: 0x[[#%x,INFO]]
# BASIC: DWARF:
# BASIC-NEXT: debug_str:
# BASIC-NEXT: - a
# BASIC-NEXT: - b
# BASIC-NEXT: - abc
# BASIC-NEXT: ...
## c) Test dumping an empty .debug_str section.
# RUN: yaml2obj --docnum=2 %s | obj2yaml | FileCheck %s --check-prefix=EMPTY --implicit-check-not=Sections
# EMPTY: DWARF:
# EMPTY-NEXT: debug_str: []
# EMPTY-NEXT: ...
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_EXEC
DWARF:
debug_str: []
## d) Test that yaml2obj stops parsing the .debug_str section if it encounters a
## string without a null terminator. The output uses a raw content section instead of
## the DWARF tag to represent the broken .debug_str section.
# RUN: yaml2obj --docnum=3 %s | obj2yaml | FileCheck %s --check-prefix=NO-TERMINATOR
# NO-TERMINATOR-NOT: DWARF:
# NO-TERMINATOR: Sections:
# NO-TERMINATOR-NEXT: - Name: .debug_str
# NO-TERMINATOR-NEXT: Type: SHT_PROGBITS
# NO-TERMINATOR-NEXT: Flags: [ SHF_MERGE, SHF_STRINGS ]
# NO-TERMINATOR-NEXT: Content: '61626300616263'
# NO-TERMINATOR-NEXT: ...
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_EXEC
Sections:
- Name: .debug_str
Type: SHT_PROGBITS
Content: "61626300616263" ## "abc\0abc"