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

92 lines
2.8 KiB
Plaintext

## .empty is not covered by a segment. Its offset is moved to 0x200 to fill the gap.
# RUN: yaml2obj --docnum=1 %s -o %t1
# RUN: llvm-objcopy %t1 %t1.out
# RUN: llvm-readelf -S %t1.out | FileCheck --check-prefix=CHECK1 %s
# CHECK1: Name Type Address Off
# CHECK1-NEXT: NULL 0000000000000000 000000
# CHECK1-NEXT: .foo PROGBITS 0000000000000000 000100
# CHECK1-NEXT: .empty PROGBITS 0000000000001000 000200
# CHECK1-NEXT: .baz PROGBITS 0000000000001000 001000
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_EXEC
Machine: EM_X86_64
Sections:
- Name: gap
Type: Fill
Size: 0xE00
- Name: .foo
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC ]
AddressAlign: 0x100
Address: 0
Size: 0x100
- Name: .empty
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC ]
Address: 0x1000
- Name: .baz
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC ]
AddressAlign: 0x1000
Address: 0x1000
Size: 0x100
## Test that we attribute .empty to the second segment. Its offset is assigned according to
## the p_offset of the second segment.
# RUN: yaml2obj --docnum=2 %s -o %t2
# RUN: llvm-objcopy %t2 %t2.out
# RUN: llvm-readelf -S -l %t2.out | FileCheck --check-prefix=CHECK2 %s
# CHECK2: Name Type Address Off
# CHECK2-NEXT: NULL 0000000000000000 000000
# CHECK2-NEXT: .foo PROGBITS 0000000000000000 000100
# CHECK2-NEXT: .empty PROGBITS 0000000000001000 001000
# CHECK2-NEXT: .baz PROGBITS 0000000000001000 001000
# CHECK2: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
# CHECK2-NEXT: LOAD 0x000100 0x0000000000000000 0x0000000000000000 0x000100 0x000100 0x100
# CHECK2-NEXT: LOAD 0x001000 0x0000000000001000 0x0000000000001000 0x000100 0x000100 0x1000
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_EXEC
Machine: EM_X86_64
Sections:
- Name: gap
Type: Fill
Size: 0xE00
- Name: .foo
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC ]
AddressAlign: 0x100
Address: 0
Size: 0x100
- Name: .empty
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC ]
Address: 0x1000
- Name: .baz
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC ]
AddressAlign: 0x1000
Address: 0x1000
Size: 0x100
ProgramHeaders:
- Type: PT_LOAD
VAddr: 0
Align: 0x100
FirstSec: .foo
LastSec: .foo
- Type: PT_LOAD
VAddr: 0x1000
Align: 0x1000
FirstSec: .empty
LastSec: .baz