1OUTPUT_FORMAT("elf64-tradlittlemips", "elf64-tradbigmips", "elf64-tradlittlemips") 2OUTPUT_ARCH(mips) 3ENTRY(_start) 4SECTIONS 5{ 6 .text 0x0 : { 7 _text = .; 8 *(.text.head) 9 *(.text) 10 *(.text.*) 11 *(.gnu.linkonce.t.*) 12 *(.plt) 13 . = ALIGN(16); 14 } 15 _etext = .; 16 _text_size = _etext - _text; 17 . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); 18 .dynamic : { *(.dynamic) } 19 . = ALIGN(4096); 20 .data : 21 { 22 _data = .; 23 *(.sdata) 24 *(.data) 25 *(.data1) 26 *(.data.*) 27 *(.got.plt) 28 HIDDEN (_gp = ALIGN (16) + 0x7ff0); 29 *(.got) 30 31 /* 32 * Note that these aren't the using the GNU "CONSTRUCTOR" output section 33 * command, so they don't start with a size. Because of p2align and the 34 * end/END definitions, and the fact that they're mergeable, they can also 35 * have NULLs which aren't guaranteed to be at the end. 36 */ 37 . = ALIGN(16); 38 __init_array_start = .; 39 *(SORT(.init_array.*)) 40 *(.init_array) 41 __init_array_end = .; 42 . = ALIGN(16); 43 __CTOR_LIST__ = .; 44 *(SORT(.ctors.*)) 45 *(.ctors) 46 __CTOR_END__ = .; 47 . = ALIGN(16); 48 __DTOR_LIST__ = .; 49 *(SORT(.dtors.*)) 50 *(.dtors) 51 __DTOR_END__ = .; 52 . = ALIGN(16); 53 __fini_array_start = .; 54 *(SORT(.fini_array.*)) 55 *(.fini_array) 56 __fini_array_end = .; 57 58 /* the EFI loader doesn't seem to like a .bss section, so we stick 59 it all into .data: */ 60 . = ALIGN(16); 61 _bss = .; 62 *(.sbss) 63 *(.scommon) 64 *(.dynbss) 65 *(.bss*) 66 *(COMMON) 67 . = ALIGN(16); 68 _bss_end = .; 69 } 70 71 . = ALIGN(4096); 72 .rel : 73 { 74 *(.rel.text*) 75 *(.rel.data*) 76 *(.rel.got) 77 *(.rel.dyn) 78 *(.rel.stab) 79 *(.rel.init_array*) 80 *(.rel.fini_array*) 81 *(.rel.ctors*) 82 *(.rel.dtors*) 83 } 84 . = ALIGN(4096); 85 .rel.plt : { *(.rel.plt) } 86 . = ALIGN(4096); 87 .rodata : { *(.rodata*) } 88 _edata = .; 89 _data_size = _edata - _etext; 90 91 . = ALIGN(4096); 92 .dynsym : { *(.dynsym) } 93 . = ALIGN(4096); 94 .dynstr : { *(.dynstr) } 95 . = ALIGN(4096); 96 .note.gnu.build-id : { *(.note.gnu.build-id) } 97 . = DATA_SEGMENT_END (.); 98 /DISCARD/ : 99 { 100 *(.rel.reloc) 101 *(.eh_frame) 102 *(.MIPS.abiflags) 103 *(.note.GNU-stack) 104 } 105 .comment 0 : { *(.comment) } 106} 107