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
126 lines
4.5 KiB
Plaintext
126 lines
4.5 KiB
Plaintext
# REQUIRES: x86
|
|
# RUN: split-file %s %t
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64 %t/a.s -o %t/a.o
|
|
|
|
## --randomize-section-padding= inserts segment offset padding and pre-section
|
|
## padding, and does not affect flags. Segment offset padding is only inserted
|
|
## when PT_LOAD changes, as shown by .bss size (.data and .bss share a PT_LOAD).
|
|
|
|
# RUN: ld.lld --randomize-section-padding=6 %t/a.o -o %t/a.out
|
|
# RUN: llvm-readelf -sS -x .rodata -x .text -x .data %t/a.out | FileCheck --check-prefix=PAD6 %s
|
|
|
|
# PAD6: .rodata PROGBITS 0000000000200158 000158 000b8d 00 A 0 0 1
|
|
# PAD6-NEXT: .text PROGBITS 0000000000201ce8 000ce8 000270 00 AX 0 0 4
|
|
# PAD6-NEXT: .data PROGBITS 0000000000202f58 000f58 000941 00 WA 0 0 1
|
|
# PAD6-NEXT: .bss NOBITS 0000000000203899 001899 000003 00 WA 0 0 1
|
|
|
|
# PAD6: 0000000000203899 0 NOTYPE LOCAL DEFAULT 4 a
|
|
# PAD6: 000000000020389a 0 NOTYPE LOCAL DEFAULT 4 b
|
|
# PAD6: 000000000020389b 0 NOTYPE LOCAL DEFAULT 4 c
|
|
|
|
# PAD6: Hex dump of section '.rodata':
|
|
# PAD6: 0x00200cd8 00000000 00000000 00000102 03
|
|
# PAD6: Hex dump of section '.text':
|
|
# PAD6: 0x00201f48 cccccccc cccccccc cccccccc 0405cc06
|
|
# PAD6: Hex dump of section '.data':
|
|
# PAD6: 0x00203888 00000000 00000000 00000000 00000708
|
|
# PAD6: 0x00203898 09
|
|
|
|
## Size of segment offset padding and location of pre-section padding is
|
|
## dependent on the seed.
|
|
|
|
# RUN: ld.lld --randomize-section-padding=46 %t/a.o -o %t/a.out
|
|
# RUN: llvm-readelf -sS -x .rodata -x .text -x .data %t/a.out | FileCheck --check-prefix=PAD46 %s
|
|
|
|
# PAD46: .rodata PROGBITS 0000000000200158 000158 000cc0 00 A 0 0 1
|
|
# PAD46-NEXT: .text PROGBITS 0000000000201e18 000e18 0009bf 00 AX 0 0 4
|
|
# PAD46-NEXT: .data PROGBITS 00000000002037d7 0017d7 000540 00 WA 0 0 1
|
|
# PAD46-NEXT: .bss NOBITS 0000000000203d17 001d17 000004 00 WA 0 0 1
|
|
|
|
# PAD46: 0000000000203d17 0 NOTYPE LOCAL DEFAULT 4 a
|
|
# PAD46: 0000000000203d18 0 NOTYPE LOCAL DEFAULT 4 b
|
|
# PAD46: 0000000000203d1a 0 NOTYPE LOCAL DEFAULT 4 c
|
|
|
|
# PAD46: Hex dump of section '.rodata':
|
|
# PAD46: 0x00200e08 00000000 00000000 00000000 00010203
|
|
# PAD46: Hex dump of section '.text':
|
|
# PAD46: 0x002027c8 cccccccc cccccccc cccccccc 040506
|
|
# PAD46: Hex dump of section '.data':
|
|
# PAD46: 0x00203d07 00000000 00000000 00000000 07000809
|
|
|
|
## When there are multiple InputSectionDescriptions for an output section,
|
|
## segment offset padding is inserted in the first InputSectionDescription.
|
|
|
|
# RUN: ld.lld --randomize-section-padding=46 %t/a.o %t/a.lds -o %t/a.out
|
|
|
|
# RUN: llvm-readelf -sS -x .rodata -x .text -x .data %t/a.out | FileCheck --check-prefix=PAD46-LDS %s
|
|
|
|
# PAD46-LDS: .rodata PROGBITS 0000000000000158 000158 000cc0 00 A 0 0 1
|
|
# PAD46-LDS-NEXT: .text PROGBITS 0000000000001000 001000 0009c0 00 AX 0 0 4
|
|
# PAD46-LDS-NEXT: .data PROGBITS 0000000000002000 002000 000540 00 WA 0 0 1
|
|
# PAD46-LDS-NEXT: .bss NOBITS 0000000000002540 002540 000004 00 WA 0 0 1
|
|
|
|
# PAD46-LDS: 0000000000002543 0 NOTYPE LOCAL DEFAULT 4 a
|
|
# PAD46-LDS: 0000000000002541 0 NOTYPE LOCAL DEFAULT 4 b
|
|
# PAD46-LDS: 0000000000002540 0 NOTYPE LOCAL DEFAULT 4 c
|
|
|
|
# PAD46-LDS: Hex dump of section '.rodata':
|
|
# PAD46-LDS: 0x00000e08 00000000 00000000 00000000 00030201 ................
|
|
# PAD46-LDS: Hex dump of section '.text':
|
|
# PAD46-LDS: 0x000019b0 cccccccc cccccccc cccc0605 04cccccc ................
|
|
# PAD46-LDS: Hex dump of section '.data':
|
|
# PAD46-LDS: 0x00002530 00000000 00000000 00000000 09000807 ................
|
|
|
|
#--- a.s
|
|
|
|
.section .rodata.a,"a",@progbits
|
|
.byte 1
|
|
|
|
.section .rodata.b,"a",@progbits
|
|
.byte 2
|
|
|
|
.section .rodata.c,"a",@progbits
|
|
.byte 3
|
|
|
|
.section .text.a,"ax",@progbits
|
|
.byte 4
|
|
|
|
.section .text.b,"ax",@progbits
|
|
.byte 5
|
|
|
|
.section .text.c,"ax",@progbits
|
|
.byte 6
|
|
|
|
.section .data.a,"aw",@progbits
|
|
.byte 7
|
|
|
|
.section .data.b,"aw",@progbits
|
|
.byte 8
|
|
|
|
.section .data.c,"aw",@progbits
|
|
.byte 9
|
|
|
|
.section .bss.a,"a",@nobits
|
|
a:
|
|
.zero 1
|
|
|
|
.section .bss.b,"a",@nobits
|
|
b:
|
|
.zero 1
|
|
|
|
.section .bss.c,"a",@nobits
|
|
c:
|
|
.zero 1
|
|
|
|
#--- a.lds
|
|
|
|
SECTIONS {
|
|
. = SIZEOF_HEADERS;
|
|
.rodata : { *(.rodata.c) *(.rodata.b) *(.rodata.a) }
|
|
. = ALIGN(CONSTANT(MAXPAGESIZE));
|
|
.text : { *(.text.c) *(.text.b) *(.text.a) }
|
|
. = ALIGN(CONSTANT(MAXPAGESIZE));
|
|
.data : { *(.data.c) *(.data.b) *(.data.a) }
|
|
.bss : { *(.bss.c) *(.bss.b) *(.bss.a) }
|
|
}
|