1OUTPUT_FORMAT("elf64-loongarch", "elf64-loongarch", "elf64-loongarch") 2OUTPUT_ARCH(loongarch) 3ENTRY(_start) 4SECTIONS 5{ 6 .text 0x0 : { 7 _text = .; 8 *(.text.head) 9 *(.text) 10 *(.text.*) 11 *(.gnu.linkonce.t.*) 12 . = ALIGN(16); 13 } 14 _etext = .; 15 _text_size = _etext - _text; 16 .dynamic : { *(.dynamic) } 17 .data : ALIGN(4096) 18 { 19 _data = .; 20 *(.sdata) 21 *(.data) 22 *(.data1) 23 *(.data.*) 24 *(.got.plt) 25 *(.got) 26 27 /* the EFI loader doesn't seem to like a .bss section, so we stick 28 it all into .data: */ 29 . = ALIGN(16); 30 _bss = .; 31 *(.sbss) 32 *(.scommon) 33 *(.dynbss) 34 *(.bss) 35 *(COMMON) 36 . = ALIGN(16); 37 _bss_end = .; 38 } 39 40 .rela.dyn : { *(.rela.dyn) } 41 .rela.plt : { *(.rela.plt) } 42 .rela.got : { *(.rela.got) } 43 .rela.data : { *(.rela.data) *(.rela.data*) } 44 . = ALIGN(4096); 45 .rodata : { *(.rodata*) } 46 . = ALIGN(512); 47 _edata = .; 48 _data_size = _edata - _data; 49 50 . = ALIGN(4096); 51 .dynsym : { *(.dynsym) } 52 . = ALIGN(4096); 53 .dynstr : { *(.dynstr) } 54 . = ALIGN(4096); 55 .note.gnu.build-id : { *(.note.gnu.build-id) } 56 /DISCARD/ : 57 { 58 *(.rel.reloc) 59 *(.eh_frame) 60 *(.note.GNU-stack) 61 } 62 .comment 0 : { *(.comment) } 63} 64