1OUTPUT_FORMAT("elf64-littleriscv", "elf64-littleriscv", "elf64-littleriscv") 2OUTPUT_ARCH(riscv) 3 4ENTRY(_start) 5SECTIONS 6{ 7 . = 0x80000000; 8 9 /* text/read-only data */ 10 .text : { 11 *(.text.head) 12 *(.text) 13 *(.text.*) 14 *(.gnu.linkonce.t.*) 15 } 16 17 . = ALIGN(0x8); 18 __ctor_list = .; 19 .init_array : { *(.init_array) } 20 __ctor_end = .; 21 __dtor_list = .; 22 .fini_array : { *(.fini_array) } 23 __dtor_end = .; 24 25 .rodata : { *(.rodata .rodata.*) } 26 27 /* writable data */ 28 . = ALIGN(0x1000); 29 __data_start = .; 30 .data : { 31 *(.data) 32 *(.data.*) 33 *(.gnu.linkonce.d.*) 34 } 35 .got : { *(.got.plt) *(.got) } 36 .dynamic : { gDynamic = .; *(.dynamic) } 37 38 /* uninitialized data (in same segment as writable data) */ 39 __bss_start = .; 40 .bss : { *(.bss) } 41 42 . = ALIGN(0x1000); 43 _end = . ; 44 45 .bss.stack : { *(.bss.stack) } 46 47 /* Strip unnecessary stuff */ 48 /DISCARD/ : { *(.comment .note .eh_frame .dtors .stab .stabstr .debug*) } 49} 50