kern64.ldscript revision 1.1
11.1Smatt/* Default linker script, for normal executables */
21.1SmattOUTPUT_FORMAT("elf64-powerpc", "elf64-powerpc",
31.1Smatt	      "elf64-powerpc")
41.1SmattOUTPUT_ARCH(powerpc:common64)
51.1SmattENTRY(_start)
61.1SmattSEARCH_DIR(/lib);
71.1SmattSECTIONS
81.1Smatt{
91.1Smatt  /*  Read-only sections, merged into text segment.  Assumes the
101.1Smatt      kernel Makefile sets the start address via -Ttext.  */
111.1Smatt  .text      :
121.1Smatt  {
131.1Smatt    PROVIDE_HIDDEN (__eprol = .);
141.1Smatt    *(.text)
151.1Smatt    *(.text.unlikely .text.*_unlikely)
161.1Smatt    *(.text.exit .text.exit.*)
171.1Smatt    *(.text.startup .text.startup.*)
181.1Smatt    *(.text.hot .text.hot.*)
191.1Smatt    *(.text.* .gnu.linkonce.t.*)
201.1Smatt    __stub_start = .;
211.1Smatt    *(.stub)
221.1Smatt    __stub_end = .;
231.1Smatt    __stub_pmap_start = .;
241.1Smatt    *(.stub.pmap)
251.1Smatt    __stub_pmap_end = .;
261.1Smatt    /* .gnu.warning sections are handled specially by elf32.em.  */
271.1Smatt    *(.gnu.warning)
281.1Smatt    *(.glink)
291.1Smatt  } =0x60000000
301.1Smatt  _etext = .;
311.1Smatt  PROVIDE (__etext = .);
321.1Smatt  PROVIDE (_etext = .);
331.1Smatt  PROVIDE (etext = .);
341.1Smatt  .rodata         : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
351.1Smatt  .rodata1        : { *(.rodata1) }
361.1Smatt  .sdata2         :
371.1Smatt  {
381.1Smatt    *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
391.1Smatt  }
401.1Smatt  .sbss2          : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) }
411.1Smatt  .jcr            : { KEEP (*(.jcr)) }
421.1Smatt  . = DATA_SEGMENT_RELRO_END (0, .);
431.1Smatt  .data           :
441.1Smatt  {
451.1Smatt    _fdata = .;
461.1Smatt    *(.data .data.* .gnu.linkonce.d.*)
471.1Smatt    SORT(CONSTRUCTORS)
481.1Smatt  }
491.1Smatt  .data1          : { *(.data1) }
501.1Smatt  .toc1		  : ALIGN(8) { *(.toc1) }
511.1Smatt  .opd		  : ALIGN(8) { KEEP (*(.opd)) }
521.1Smatt  .branch_lt	  : ALIGN(8) { *(.branch_lt) }
531.1Smatt  .got		: ALIGN(8) { *(.got .toc) }
541.1Smatt  /* We want the small data sections together, so single-instruction offsets
551.1Smatt     can access them all, and initialized data all before uninitialized, so
561.1Smatt     we can shorten the on-disk segment size.  */
571.1Smatt  . = ALIGN(64);	/* COHERENCY UNIT */
581.1Smatt  .data.cacheline_aligned	: { *(.data.cacheline_aligned) }
591.1Smatt  . = ALIGN(64);	/* COHERENCY UNIT */
601.1Smatt  .data.read_mostly		: { *(.data.read_mostly) }
611.1Smatt  . = ALIGN(64);	/* COHERENCY UNIT */
621.1Smatt  .sdata          :
631.1Smatt  {
641.1Smatt    *(.sdata .sdata.* .gnu.linkonce.s.*)
651.1Smatt  }
661.1Smatt  _edata = .; PROVIDE (edata = .);
671.1Smatt  __bss_start = .;
681.1Smatt  .tocbss	  : ALIGN(8) { *(.tocbss)}
691.1Smatt  .sbss           :
701.1Smatt  {
711.1Smatt    *(.dynsbss)
721.1Smatt    *(.sbss .sbss.* .gnu.linkonce.sb.*)
731.1Smatt    *(.scommon)
741.1Smatt  }
751.1Smatt  .plt            : { *(.plt) }
761.1Smatt  .iplt           : { *(.iplt) }
771.1Smatt  .bss            :
781.1Smatt  {
791.1Smatt   *(.dynbss)
801.1Smatt   *(.bss .bss.* .gnu.linkonce.b.*)
811.1Smatt   *(COMMON)
821.1Smatt   /* Align here to ensure that the .bss section occupies space up to
831.1Smatt      _end.  Align after .bss to ensure correct alignment even if the
841.1Smatt      .bss section disappears because there are no input sections.
851.1Smatt      FIXME: Why do we need it? When there is no .bss section, we don't
861.1Smatt      pad the .data section.  */
871.1Smatt   . = ALIGN(. != 0 ? 64 / 8 : 1);
881.1Smatt  }
891.1Smatt  . = ALIGN(64 / 8);
901.1Smatt  . = ALIGN(64 / 8);
911.1Smatt  _end = .; PROVIDE (end = .);
921.1Smatt  . = DATA_SEGMENT_END (.);
931.1Smatt  /* Stabs debugging sections.  */
941.1Smatt  .stab          0 : { *(.stab) }
951.1Smatt  .stabstr       0 : { *(.stabstr) }
961.1Smatt  .stab.excl     0 : { *(.stab.excl) }
971.1Smatt  .stab.exclstr  0 : { *(.stab.exclstr) }
981.1Smatt  .stab.index    0 : { *(.stab.index) }
991.1Smatt  .stab.indexstr 0 : { *(.stab.indexstr) }
1001.1Smatt  .comment       0 : { *(.comment) }
1011.1Smatt  /* DWARF debug sections.
1021.1Smatt     Symbols in the DWARF debugging sections are relative to the beginning
1031.1Smatt     of the section so we begin them at 0.  */
1041.1Smatt  /* DWARF 1 */
1051.1Smatt  .debug          0 : { *(.debug) }
1061.1Smatt  .line           0 : { *(.line) }
1071.1Smatt  /* GNU DWARF 1 extensions */
1081.1Smatt  .debug_srcinfo  0 : { *(.debug_srcinfo) }
1091.1Smatt  .debug_sfnames  0 : { *(.debug_sfnames) }
1101.1Smatt  /* DWARF 1.1 and DWARF 2 */
1111.1Smatt  .debug_aranges  0 : { *(.debug_aranges) }
1121.1Smatt  .debug_pubnames 0 : { *(.debug_pubnames) }
1131.1Smatt  /* DWARF 2 */
1141.1Smatt  .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
1151.1Smatt  .debug_abbrev   0 : { *(.debug_abbrev) }
1161.1Smatt  .debug_line     0 : { *(.debug_line) }
1171.1Smatt  .debug_frame    0 : { *(.debug_frame) }
1181.1Smatt  .debug_str      0 : { *(.debug_str) }
1191.1Smatt  .debug_loc      0 : { *(.debug_loc) }
1201.1Smatt  .debug_macinfo  0 : { *(.debug_macinfo) }
1211.1Smatt  /* SGI/MIPS DWARF 2 extensions */
1221.1Smatt  .debug_weaknames 0 : { *(.debug_weaknames) }
1231.1Smatt  .debug_funcnames 0 : { *(.debug_funcnames) }
1241.1Smatt  .debug_typenames 0 : { *(.debug_typenames) }
1251.1Smatt  .debug_varnames  0 : { *(.debug_varnames) }
1261.1Smatt  /* DWARF 3 */
1271.1Smatt  .debug_pubtypes 0 : { *(.debug_pubtypes) }
1281.1Smatt  .debug_ranges   0 : { *(.debug_ranges) }
1291.1Smatt  .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
1301.1Smatt  /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }
1311.1Smatt}
132