1 1.1 matt /* Default linker script, for normal executables */ 2 1.1 matt OUTPUT_FORMAT("elf64-powerpc", "elf64-powerpc", 3 1.1 matt "elf64-powerpc") 4 1.1 matt OUTPUT_ARCH(powerpc:common64) 5 1.1 matt ENTRY(_start) 6 1.1 matt SECTIONS 7 1.1 matt { 8 1.1 matt /* Read-only sections, merged into text segment. Assumes the 9 1.1 matt kernel Makefile sets the start address via -Ttext. */ 10 1.1 matt .text : 11 1.1 matt { 12 1.1 matt PROVIDE_HIDDEN (__eprol = .); 13 1.1 matt *(.text) 14 1.1 matt *(.text.unlikely .text.*_unlikely) 15 1.1 matt *(.text.exit .text.exit.*) 16 1.1 matt *(.text.startup .text.startup.*) 17 1.1 matt *(.text.hot .text.hot.*) 18 1.1 matt *(.text.* .gnu.linkonce.t.*) 19 1.1 matt __stub_start = .; 20 1.1 matt *(.stub) 21 1.1 matt __stub_end = .; 22 1.1 matt __stub_pmap_start = .; 23 1.1 matt *(.stub.pmap) 24 1.1 matt __stub_pmap_end = .; 25 1.1 matt /* .gnu.warning sections are handled specially by elf32.em. */ 26 1.1 matt *(.gnu.warning) 27 1.1 matt *(.glink) 28 1.1 matt } =0x60000000 29 1.1 matt _etext = .; 30 1.1 matt PROVIDE (__etext = .); 31 1.1 matt PROVIDE (_etext = .); 32 1.1 matt PROVIDE (etext = .); 33 1.1 matt .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } 34 1.1 matt .rodata1 : { *(.rodata1) } 35 1.1 matt .sdata2 : 36 1.1 matt { 37 1.1 matt *(.sdata2 .sdata2.* .gnu.linkonce.s2.*) 38 1.1 matt } 39 1.1 matt .sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) } 40 1.1 matt .jcr : { KEEP (*(.jcr)) } 41 1.1 matt . = DATA_SEGMENT_RELRO_END (0, .); 42 1.1 matt .data : 43 1.1 matt { 44 1.1 matt _fdata = .; 45 1.1 matt *(.data .data.* .gnu.linkonce.d.*) 46 1.1 matt SORT(CONSTRUCTORS) 47 1.1 matt } 48 1.1 matt .data1 : { *(.data1) } 49 1.1 matt .toc1 : ALIGN(8) { *(.toc1) } 50 1.1 matt .opd : ALIGN(8) { KEEP (*(.opd)) } 51 1.1 matt .branch_lt : ALIGN(8) { *(.branch_lt) } 52 1.1 matt .got : ALIGN(8) { *(.got .toc) } 53 1.1 matt /* We want the small data sections together, so single-instruction offsets 54 1.1 matt can access them all, and initialized data all before uninitialized, so 55 1.1 matt we can shorten the on-disk segment size. */ 56 1.1 matt . = ALIGN(64); /* COHERENCY UNIT */ 57 1.1 matt .data.cacheline_aligned : { *(.data.cacheline_aligned) } 58 1.1 matt . = ALIGN(64); /* COHERENCY UNIT */ 59 1.1 matt .data.read_mostly : { *(.data.read_mostly) } 60 1.1 matt . = ALIGN(64); /* COHERENCY UNIT */ 61 1.1 matt .sdata : 62 1.1 matt { 63 1.1 matt *(.sdata .sdata.* .gnu.linkonce.s.*) 64 1.1 matt } 65 1.1 matt _edata = .; PROVIDE (edata = .); 66 1.1 matt __bss_start = .; 67 1.1 matt .tocbss : ALIGN(8) { *(.tocbss)} 68 1.1 matt .sbss : 69 1.1 matt { 70 1.1 matt *(.dynsbss) 71 1.1 matt *(.sbss .sbss.* .gnu.linkonce.sb.*) 72 1.1 matt *(.scommon) 73 1.1 matt } 74 1.1 matt .plt : { *(.plt) } 75 1.1 matt .iplt : { *(.iplt) } 76 1.1 matt .bss : 77 1.1 matt { 78 1.2 uebayasi *(.dynbss) 79 1.2 uebayasi *(.bss .bss.* .gnu.linkonce.b.*) 80 1.2 uebayasi *(COMMON) 81 1.2 uebayasi /* Align here to ensure that the .bss section occupies space up to 82 1.2 uebayasi _end. Align after .bss to ensure correct alignment even if the 83 1.2 uebayasi .bss section disappears because there are no input sections. 84 1.2 uebayasi FIXME: Why do we need it? When there is no .bss section, we don't 85 1.2 uebayasi pad the .data section. */ 86 1.2 uebayasi . = ALIGN(. != 0 ? 64 / 8 : 1); 87 1.1 matt } 88 1.1 matt . = ALIGN(64 / 8); 89 1.1 matt . = ALIGN(64 / 8); 90 1.1 matt _end = .; PROVIDE (end = .); 91 1.1 matt . = DATA_SEGMENT_END (.); 92 1.1 matt } 93