github.com/google/syzkaller@v0.0.0-20251211124644-a066d2bc4b02/pkg/kfuzztest/testdata/linker.ld (about) 1 /* Copyright 2025 syzkaller project authors. All rights reserved. */ 2 /* Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. */ 3 4 /* Defines a basic linkage script for building kernel-like KFuzzTest metadata into a binary. */ 5 PAGE_SIZE = 0x1000; 6 7 PHDRS 8 { 9 text PT_LOAD FLAGS(5); /* R, X */ 10 data PT_LOAD FLAGS(6); /* R, W */ 11 } 12 13 SECTIONS 14 { 15 .text : { *(.text) } :text 16 17 .rodata : { 18 *(.rodata*) 19 20 . = ALIGN(PAGE_SIZE); 21 __kfuzztest_targets_start = .; 22 KEEP(*(.kfuzztest_target)); 23 __kfuzztest_targets_end = .; 24 25 . = ALIGN(PAGE_SIZE); 26 __kfuzztest_constraints_start = .; 27 KEEP(*(.kfuzztest_constraint)); 28 __kfuzztest_constraints_end = .; 29 30 . = ALIGN(PAGE_SIZE); 31 __kfuzztest_annotations_start = .; 32 KEEP(*(.kfuzztest_annotation)); 33 __kfuzztest_annotations_end = .; 34 35 } :text 36 37 .data : { *(.data) } :data 38 .bss : { *(.bss) } :data 39 }