Files
TheRock/compiler/amd-llvm/lld/test/ELF/linkerscript/section-address-align.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

35 lines
1.6 KiB
Plaintext

# REQUIRES: x86
## Test ALIGN when specifying the output section address.
# RUN: echo '.globl _start; _start: ret; \
# RUN: .section .data.rel.ro,"aw"; .balign 8; .byte 0; \
# RUN: .data; .byte 0; \
# RUN: .bss; .balign 32; .byte 0' | \
# RUN: llvm-mc -filetype=obj -triple=x86_64 - -o %t.o
# RUN: ld.lld -T %s %t.o -o %t 2>&1 | FileCheck --check-prefix=WARN %s --implicit-check-not=warning:
# RUN: llvm-readelf -S %t | FileCheck %s
# WARN: warning: address (0x10004) of section .data.rel.ro is not a multiple of alignment (8)
# WARN: warning: address (0x20008) of section .bss is not a multiple of alignment (32)
# CHECK: Name Type Address Off Size ES Flg Lk Inf Al
# CHECK-NEXT: NULL 0000000000000000 000000 000000 00 0 0 0
# CHECK-NEXT: .text PROGBITS 0000000000010000 001000 000001 00 AX 0 0 4
# CHECK-NEXT: .data.rel.ro PROGBITS 0000000000010004 001004 000005 00 WA 0 0 8
# CHECK-NEXT: .data PROGBITS 0000000000020000 002000 000001 00 WA 0 0 1
# CHECK-NEXT: .bss NOBITS 0000000000020008 002001 000019 00 WA 0 0 32
SECTIONS {
.text 0x10000 : { *(.text) }
## The output .data.rel.ro starts at 0x10004.
## The input .data.rel.ro starts at 0x10008 and ends at 0x10009.
## sh_size(.data.rel.ro) = 0x10009-0x10004 = 0x5.
.data.rel.ro ALIGN(4) : { *(.data.rel.ro) }
.data 0x20000 : { *(.data) }
## The output .bss starts at 0x20008.
## The input .bss starts at 0x20020 and ends at 0x20021.
## sh_size(.bss) = 0x20021-0x20008 = 0x19.
.bss ALIGN(8) : { *(.bss) }
}