1/* Default linker script, for normal executables */ 2OUTPUT_FORMAT("elf64-powerpc", "elf64-powerpc", 3 "elf64-powerpc") 4OUTPUT_ARCH(powerpc:common64) 5ENTRY(_start) 6SEARCH_DIR(/lib); 7SECTIONS 8{ 9 /* Read-only sections, merged into text segment. Assumes the 10 kernel Makefile sets the start address via -Ttext. */ 11 .text : 12 { 13 PROVIDE_HIDDEN (__eprol = .); 14 *(.text) 15 *(.text.unlikely .text.*_unlikely) 16 *(.text.exit .text.exit.*) 17 *(.text.startup .text.startup.*) 18 *(.text.hot .text.hot.*) 19 *(.text.* .gnu.linkonce.t.*) 20 __stub_start = .; 21 *(.stub) 22 __stub_end = .; 23 __stub_pmap_start = .; 24 *(.stub.pmap) 25 __stub_pmap_end = .; 26 /* .gnu.warning sections are handled specially by elf32.em. */ 27 *(.gnu.warning) 28 *(.glink) 29 } =0x60000000 30 _etext = .; 31 PROVIDE (__etext = .); 32 PROVIDE (_etext = .); 33 PROVIDE (etext = .); 34 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } 35 .rodata1 : { *(.rodata1) } 36 .sdata2 : 37 { 38 *(.sdata2 .sdata2.* .gnu.linkonce.s2.*) 39 } 40 .sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) } 41 .jcr : { KEEP (*(.jcr)) } 42 . = DATA_SEGMENT_RELRO_END (0, .); 43 .data : 44 { 45 _fdata = .; 46 *(.data .data.* .gnu.linkonce.d.*) 47 SORT(CONSTRUCTORS) 48 } 49 .data1 : { *(.data1) } 50 .toc1 : ALIGN(8) { *(.toc1) } 51 .opd : ALIGN(8) { KEEP (*(.opd)) } 52 .branch_lt : ALIGN(8) { *(.branch_lt) } 53 .got : ALIGN(8) { *(.got .toc) } 54 /* We want the small data sections together, so single-instruction offsets 55 can access them all, and initialized data all before uninitialized, so 56 we can shorten the on-disk segment size. */ 57 . = ALIGN(64); /* COHERENCY UNIT */ 58 .data.cacheline_aligned : { *(.data.cacheline_aligned) } 59 . = ALIGN(64); /* COHERENCY UNIT */ 60 .data.read_mostly : { *(.data.read_mostly) } 61 . = ALIGN(64); /* COHERENCY UNIT */ 62 .sdata : 63 { 64 *(.sdata .sdata.* .gnu.linkonce.s.*) 65 } 66 _edata = .; PROVIDE (edata = .); 67 __bss_start = .; 68 .tocbss : ALIGN(8) { *(.tocbss)} 69 .sbss : 70 { 71 *(.dynsbss) 72 *(.sbss .sbss.* .gnu.linkonce.sb.*) 73 *(.scommon) 74 } 75 .plt : { *(.plt) } 76 .iplt : { *(.iplt) } 77 .bss : 78 { 79 *(.dynbss) 80 *(.bss .bss.* .gnu.linkonce.b.*) 81 *(COMMON) 82 /* Align here to ensure that the .bss section occupies space up to 83 _end. Align after .bss to ensure correct alignment even if the 84 .bss section disappears because there are no input sections. 85 FIXME: Why do we need it? When there is no .bss section, we don't 86 pad the .data section. */ 87 . = ALIGN(. != 0 ? 64 / 8 : 1); 88 } 89 . = ALIGN(64 / 8); 90 . = ALIGN(64 / 8); 91 _end = .; PROVIDE (end = .); 92 . = DATA_SEGMENT_END (.); 93 /* Stabs debugging sections. */ 94 .stab 0 : { *(.stab) } 95 .stabstr 0 : { *(.stabstr) } 96 .stab.excl 0 : { *(.stab.excl) } 97 .stab.exclstr 0 : { *(.stab.exclstr) } 98 .stab.index 0 : { *(.stab.index) } 99 .stab.indexstr 0 : { *(.stab.indexstr) } 100 .comment 0 : { *(.comment) } 101 /* DWARF debug sections. 102 Symbols in the DWARF debugging sections are relative to the beginning 103 of the section so we begin them at 0. */ 104 /* DWARF 1 */ 105 .debug 0 : { *(.debug) } 106 .line 0 : { *(.line) } 107 /* GNU DWARF 1 extensions */ 108 .debug_srcinfo 0 : { *(.debug_srcinfo) } 109 .debug_sfnames 0 : { *(.debug_sfnames) } 110 /* DWARF 1.1 and DWARF 2 */ 111 .debug_aranges 0 : { *(.debug_aranges) } 112 .debug_pubnames 0 : { *(.debug_pubnames) } 113 /* DWARF 2 */ 114 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } 115 .debug_abbrev 0 : { *(.debug_abbrev) } 116 .debug_line 0 : { *(.debug_line) } 117 .debug_frame 0 : { *(.debug_frame) } 118 .debug_str 0 : { *(.debug_str) } 119 .debug_loc 0 : { *(.debug_loc) } 120 .debug_macinfo 0 : { *(.debug_macinfo) } 121 /* SGI/MIPS DWARF 2 extensions */ 122 .debug_weaknames 0 : { *(.debug_weaknames) } 123 .debug_funcnames 0 : { *(.debug_funcnames) } 124 .debug_typenames 0 : { *(.debug_typenames) } 125 .debug_varnames 0 : { *(.debug_varnames) } 126 /* DWARF 3 */ 127 .debug_pubtypes 0 : { *(.debug_pubtypes) } 128 .debug_ranges 0 : { *(.debug_ranges) } 129 .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } 130 /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } 131} 132