Files
TheRock/compiler/amd-llvm/lld/test/ELF/format-binary.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

53 lines
2.3 KiB
Plaintext

# REQUIRES: x86
# RUN: rm -rf %t.dir
# RUN: mkdir %t.dir
# RUN: cd %t.dir
# RUN: mkdir d
# RUN: echo -n "Fluffle Puff" > d/t.txt
# RUN: ld.lld -m elf_x86_64 -r -b binary d/t.txt -t -o ro | FileCheck %s --check-prefix=RO-TRACE
# RUN: llvm-readelf -h -S -s -x .data ro | FileCheck --check-prefix=RO %s
# RO-TRACE: d/t.txt
# RO: Machine: Advanced Micro Devices X86-64
# RO: Name Type Address Off Size ES Flg Lk Inf Al
# RO-NEXT: NULL 0000000000000000 000000 000000 00 0 0 0
# RO-NEXT: .data PROGBITS 0000000000000000 {{.*}} 00000c 00 WA 0 0 8
# RO: Value Size Type Bind Vis Ndx Name
# RO: 0000000000000000 0 OBJECT GLOBAL DEFAULT 1 _binary_d_t_txt_start
# RO-NEXT: 000000000000000c 0 OBJECT GLOBAL DEFAULT 1 _binary_d_t_txt_end
# RO-NEXT: 000000000000000c 0 OBJECT GLOBAL DEFAULT ABS _binary_d_t_txt_size
# RO: Hex dump of section '.data':
# RO-NEXT: 0x00000000 466c7566 666c6520 50756666 Fluffle Puff
# RUN: echo 'OUTPUT_FORMAT(elf64-x86-64)' > t.lds
# RUN: ld.lld -b binary -T t.lds d/t.txt -o exe
# RUN: llvm-readelf -h -S -s exe | FileCheck --check-prefix=EXE %s
## bfdname can be quoted.
# RUN: echo 'OUTPUT_FORMAT("elf64-x86-64")' > t1.lds
# RUN: ld.lld -b binary -T t1.lds d/t.txt -o exe1
# RUN: llvm-readelf -h -S -s exe | FileCheck --check-prefix=EXE %s
# EXE: Machine: Advanced Micro Devices X86-64
# EXE: [Nr] Name Type Address Off Size ES Flg Lk Inf Al
# EXE: [ 2] .data PROGBITS {{.*}} 00000c 00 WA 0 0 8
# EXE: Size Type Bind Vis Ndx Name
# EXE: 0 OBJECT GLOBAL DEFAULT 2 _binary_d_t_txt_start
# EXE-NEXT: 0 OBJECT GLOBAL DEFAULT 2 _binary_d_t_txt_end
# EXE-NEXT: 0 OBJECT GLOBAL DEFAULT ABS _binary_d_t_txt_size
# RUN: not ld.lld -b foo 2>&1 | FileCheck --check-prefix=ERR %s
# ERR: error: unknown --format value: foo (supported formats: elf, default, binary)
## Non-isalnum bytes are converted to _. See D37331.
# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o d/£.o
# RUN: ld.lld d/£.o --format=binary d/£.o -o unicode
# RUN: llvm-nm -p unicode | FileCheck --check-prefix=UNICODE %s
# UNICODE: D _binary_d_{{_+}}o_start
# UNICODE: D _binary_d_{{_+}}o_end
# UNICODE: A _binary_d_{{_+}}o_size