1OUTPUT_FORMAT("elf64-powerpc-freebsd", "elf64-powerpc-freebsd", 2 "elf64-powerpc-freebsd") 3OUTPUT_ARCH(powerpc:common64) 4ENTRY(__start) 5SEARCH_DIR(/usr/lib); 6PROVIDE (__stack = 0); 7PHDRS 8{ 9 kernel PT_LOAD; 10 dynamic PT_DYNAMIC; 11} 12SECTIONS 13{ 14 15 /* Low-address wrapper for bootloaders (kexec/kboot) that can't parse ELF */ 16 . = kernbase - 0x100; 17 .kboot : { *(.text.kboot) } :kernel 18 19 /* Read-only sections, merged into text segment: */ 20 . = kernbase; 21 PROVIDE (begin = .); 22 23 .text : 24 { 25 *(.glink) 26 *(.text) 27 *(.stub) 28 /* .gnu.warning sections are handled specially by elf32.em. */ 29 *(.gnu.warning) 30 *(.gnu.linkonce.t*) 31 } =0 32 _etext = .; 33 PROVIDE (etext = .); 34 35 /* Do not emit PT_INTERP section, which confuses some loaders (kexec-lite) */ 36 /DISCARD/ : { *(.interp) } 37 38 .hash : { *(.hash) } 39 .dynsym : { *(.dynsym) } 40 .dynstr : { *(.dynstr) } 41 .gnu.version : { *(.gnu.version) } 42 .gnu.version_d : { *(.gnu.version_d) } 43 .gnu.version_r : { *(.gnu.version_r) } 44 .note.gnu.build-id : { 45 PROVIDE (__build_id_start = .); 46 *(.note.gnu.build-id) 47 PROVIDE (__build_id_end = .); 48 } 49 50 /* Do not emit any additional notes. */ 51 /DISCARD/ : { *(.note.*) } 52 53 .rela.text : 54 { *(.rela.text) *(.rela.gnu.linkonce.t*) } 55 .rela.data : 56 { *(.rela.data) *(.rela.gnu.linkonce.d*) } 57 .rela.rodata : 58 { *(.rela.rodata) *(.rela.gnu.linkonce.r*) } 59 .rela.got : { *(.rela.got) } 60 .rela.got1 : { *(.rela.got1) } 61 .rela.got2 : { *(.rela.got2) } 62 .rela.ctors : { *(.rela.ctors) } 63 .rela.dtors : { *(.rela.dtors) } 64 .rela.init : { *(.rela.init) } 65 .rela.fini : { *(.rela.fini) } 66 .rela.bss : { *(.rela.bss) } 67 .rela.plt : { *(.rela.plt) } 68 .rela.sdata : { *(.rela.sdata) } 69 .rela.sbss : { *(.rela.sbss) } 70 .rela.sdata2 : { *(.rela.sdata2) } 71 .rela.sbss2 : { *(.rela.sbss2) } 72 73 .init : { *(.init) } =0 74 .fini : { *(.fini) } =0 75 .rodata : { *(.rodata) *(.gnu.linkonce.r*) } 76 .rodata1 : { *(.rodata1) } 77 .sdata2 : { *(.sdata2) } 78 .sbss2 : { *(.sbss2) } 79 /* Adjust the address for the data segment to the next page up. */ 80 . = ALIGN(4096); 81 .data.read_frequently : 82 { 83 *(SORT_BY_ALIGNMENT(.data.read_frequently)) 84 } 85 .data.read_mostly : 86 { 87 *(.data.read_mostly) 88 } 89 . = ALIGN(128); 90 .data.exclusive_cache_line : 91 { 92 *(.data.exclusive_cache_line) 93 } 94 . = ALIGN(128); 95 .data : 96 { 97 *(.data) 98 *(.gnu.linkonce.d*) 99 } 100 .data1 : { *(.data1) } 101 .toc1 : ALIGN(8) { *(.toc1) } 102 .opd : ALIGN(8) { KEEP (*(.opd)) } 103 .branch_lt : ALIGN(8) { *(.branch_lt) } 104 . = ALIGN(4096); 105 .got : ALIGN(8) { __tocbase = .; *(.got) } 106 .toc : ALIGN(8) { *(.toc) } 107 .init_array : 108 { 109 PROVIDE_HIDDEN (__init_array_start = .); 110 KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*))) 111 KEEP (*(.init_array)) 112 PROVIDE_HIDDEN (__init_array_end = .); 113 } 114 .fini_array : 115 { 116 PROVIDE_HIDDEN (__fini_array_start = .); 117 KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*))) 118 KEEP (*(.fini_array)) 119 PROVIDE_HIDDEN (__fini_array_end = .); 120 } 121 .dynamic : { *(.dynamic) } :kernel :dynamic 122 /* Put .ctors and .dtors next to the .got2 section, so that the pointers 123 get relocated with -mrelocatable. Also put in the .fixup pointers. 124 The current compiler no longer needs this, but keep it around for 2.7.2 */ 125 PROVIDE (_GOT2_START_ = .); 126 .got2 : { *(.got2) } :kernel 127 PROVIDE (__CTOR_LIST__ = .); 128 .ctors : { *(.ctors) } 129 PROVIDE (__CTOR_END__ = .); 130 PROVIDE (__DTOR_LIST__ = .); 131 .dtors : { *(.dtors) } 132 PROVIDE (__DTOR_END__ = .); 133 PROVIDE (_FIXUP_START_ = .); 134 .fixup : { *(.fixup) } 135 PROVIDE (_FIXUP_END_ = .); 136 PROVIDE (_GOT2_END_ = .); 137 /* We want the small data sections together, so single-instruction offsets 138 can access them all, and initialized data all before uninitialized, so 139 we can shorten the on-disk segment size. */ 140 .sdata : { *(.sdata) } 141 _edata = .; 142 PROVIDE (edata = .); 143 .sbss : 144 { 145 PROVIDE (__sbss_start = .); 146 *(.sbss) 147 *(.scommon) 148 *(.dynsbss) 149 PROVIDE (__sbss_end = .); 150 } 151 .plt : { *(.plt) } 152 .bss : 153 { 154 PROVIDE (__bss_start = .); 155 *(.dynbss) 156 *(.bss) 157 *(COMMON) 158 } 159 _end = . ; 160 PROVIDE (end = .); 161 162 /* Debug */ 163 INCLUDE debuginfo.ldscript 164 165 .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } 166 /DISCARD/ : { *(.note.GNU-stack) } 167} 168