1b95f138fSHeinrich Schuchardt/* SPDX-License-Identifier: GPL-2.0+ */ 2b95f138fSHeinrich Schuchardt 3b95f138fSHeinrich SchuchardtOUTPUT_FORMAT("elf64-littleriscv", "elf64-littleriscv", "elf64-littleriscv") 4b95f138fSHeinrich SchuchardtOUTPUT_ARCH(riscv) 5b95f138fSHeinrich SchuchardtENTRY(_start) 6b95f138fSHeinrich SchuchardtSECTIONS { 7b95f138fSHeinrich Schuchardt.text 0x0 : 8b95f138fSHeinrich Schuchardt { 9b95f138fSHeinrich Schuchardt _text = .; 10b95f138fSHeinrich Schuchardt *(.text.head) 11b95f138fSHeinrich Schuchardt *(.text) 12b95f138fSHeinrich Schuchardt *(.text.*) 13b95f138fSHeinrich Schuchardt *(.gnu.linkonce.t.*) 14b95f138fSHeinrich Schuchardt *(.srodata) 15b95f138fSHeinrich Schuchardt *(.rodata*) 16b95f138fSHeinrich Schuchardt . = ALIGN(16); 17b95f138fSHeinrich Schuchardt } 18b95f138fSHeinrich Schuchardt _etext = .; 19b95f138fSHeinrich Schuchardt _text_size = . - _text; 2098f12507SLetu Ren. = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); 21b95f138fSHeinrich Schuchardt.dynamic : 22b95f138fSHeinrich Schuchardt { *(.dynamic) } 23b95f138fSHeinrich Schuchardt.data : 24b95f138fSHeinrich Schuchardt ALIGN(4096) 25b95f138fSHeinrich Schuchardt { 26b95f138fSHeinrich Schuchardt _data = .; 27b95f138fSHeinrich Schuchardt *(.sdata) 28b95f138fSHeinrich Schuchardt *(.data) 29b95f138fSHeinrich Schuchardt *(.data1) 30b95f138fSHeinrich Schuchardt *(.data.*) 31b95f138fSHeinrich Schuchardt *(.got.plt) 32b95f138fSHeinrich Schuchardt *(.got) 33b95f138fSHeinrich Schuchardt 34b95f138fSHeinrich Schuchardt /* the EFI loader doesn't seem to like a .bss section, so we stick 35b95f138fSHeinrich Schuchardt it all into .data: */ 36b95f138fSHeinrich Schuchardt . = ALIGN(16); 37b95f138fSHeinrich Schuchardt _bss = .; 38b95f138fSHeinrich Schuchardt *(.sbss) 39b95f138fSHeinrich Schuchardt *(.scommon) 40b95f138fSHeinrich Schuchardt *(.dynbss) 41b95f138fSHeinrich Schuchardt *(.bss) 42b95f138fSHeinrich Schuchardt *(COMMON) 43b95f138fSHeinrich Schuchardt . = ALIGN(16); 44b95f138fSHeinrich Schuchardt _bss_end = .; 45b95f138fSHeinrich Schuchardt } 46b95f138fSHeinrich Schuchardt 47b95f138fSHeinrich Schuchardt.rela.text : 48b95f138fSHeinrich Schuchardt { *(.rela.text) *(.rela.text*) } 49b95f138fSHeinrich Schuchardt.rela.dyn : 50b95f138fSHeinrich Schuchardt { *(.rela.dyn) } 51b95f138fSHeinrich Schuchardt.rela.plt : 52b95f138fSHeinrich Schuchardt { *(.rela.plt) } 53b95f138fSHeinrich Schuchardt.rela.got : 54b95f138fSHeinrich Schuchardt { *(.rela.got) } 55b95f138fSHeinrich Schuchardt.rela.data : 56b95f138fSHeinrich Schuchardt { *(.rela.data) *(.rela.data*) } 57b95f138fSHeinrich Schuchardt . = ALIGN(512); 58b95f138fSHeinrich Schuchardt _edata = .; 59b95f138fSHeinrich Schuchardt _data_size = . - _data; 60b95f138fSHeinrich Schuchardt 61b95f138fSHeinrich Schuchardt . = ALIGN(4096); 62b95f138fSHeinrich Schuchardt.dynsym : 63b95f138fSHeinrich Schuchardt { *(.dynsym) } 64b95f138fSHeinrich Schuchardt . = ALIGN(4096); 65b95f138fSHeinrich Schuchardt.dynstr : 66b95f138fSHeinrich Schuchardt { *(.dynstr) } 67b95f138fSHeinrich Schuchardt . = ALIGN(4096); 68b95f138fSHeinrich Schuchardt.note.gnu.build-id : 69b95f138fSHeinrich Schuchardt { *(.note.gnu.build-id) } 70*231c7632SCallum Farmer. = DATA_SEGMENT_END (.); 71b95f138fSHeinrich Schuchardt/DISCARD/ : 72b95f138fSHeinrich Schuchardt { 73b95f138fSHeinrich Schuchardt *(.rel.reloc) 74b95f138fSHeinrich Schuchardt *(.eh_frame) 75b95f138fSHeinrich Schuchardt *(.note.GNU-stack) 76b95f138fSHeinrich Schuchardt } 77b95f138fSHeinrich Schuchardt.comment 0 : 78b95f138fSHeinrich Schuchardt { *(.comment) } 79b95f138fSHeinrich Schuchardt} 80