155825Speter/* $FreeBSD: stable/11/sys/conf/ldscript.powerpc 317145 2017-04-19 15:33:24Z emaste $ */
278388Sbenno
3272888SbaptOUTPUT_FORMAT("elf32-powerpc-freebsd", "elf32-powerpc-freebsd",
4272888Sbapt	      "elf32-powerpc-freebsd")
578388SbennoOUTPUT_ARCH(powerpc)
637684SdfrENTRY(__start)
755825SpeterSEARCH_DIR(/usr/lib);
878388SbennoPROVIDE (__stack = 0);
937684SdfrSECTIONS
1037684Sdfr{
1137684Sdfr  /* Read-only sections, merged into text segment: */
12176617Smarcel
13176617Smarcel  . = kernbase + SIZEOF_HEADERS;
14277334Snwhitehorn  PROVIDE (begin = . - SIZEOF_HEADERS);
15176617Smarcel
16176617Smarcel  .text      :
17176617Smarcel  {
18176617Smarcel    *(.text)
19176617Smarcel    *(.stub)
20176617Smarcel    /* .gnu.warning sections are handled specially by elf32.em.  */
21176617Smarcel    *(.gnu.warning)
22176617Smarcel    *(.gnu.linkonce.t*)
23176617Smarcel  } =0
24176617Smarcel  _etext = .;
25176617Smarcel  PROVIDE (etext = .);
26176617Smarcel
2737684Sdfr  .interp     : { *(.interp) 	}
2837684Sdfr  .hash          : { *(.hash)		}
2937684Sdfr  .dynsym        : { *(.dynsym)		}
3037684Sdfr  .dynstr        : { *(.dynstr)		}
3137684Sdfr  .gnu.version   : { *(.gnu.version)	}
3237684Sdfr  .gnu.version_d   : { *(.gnu.version_d)	}
3337684Sdfr  .gnu.version_r   : { *(.gnu.version_r)	}
3437684Sdfr  .rela.text     :
3537684Sdfr    { *(.rela.text) *(.rela.gnu.linkonce.t*) }
3637684Sdfr  .rela.data     :
3737684Sdfr    { *(.rela.data) *(.rela.gnu.linkonce.d*) }
3837684Sdfr  .rela.rodata   :
3937684Sdfr    { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
4037684Sdfr  .rela.got      : { *(.rela.got)		}
4178388Sbenno  .rela.got1     : { *(.rela.got1)		}
4278388Sbenno  .rela.got2     : { *(.rela.got2)		}
4337684Sdfr  .rela.ctors    : { *(.rela.ctors)	}
4437684Sdfr  .rela.dtors    : { *(.rela.dtors)	}
4537684Sdfr  .rela.init     : { *(.rela.init)	}
4637684Sdfr  .rela.fini     : { *(.rela.fini)	}
4737684Sdfr  .rela.bss      : { *(.rela.bss)		}
4837684Sdfr  .rela.plt      : { *(.rela.plt)		}
4978388Sbenno  .rela.sdata    : { *(.rela.sdata)		}
5078388Sbenno  .rela.sbss     : { *(.rela.sbss)		}
5178388Sbenno  .rela.sdata2   : { *(.rela.sdata2)		}
5278388Sbenno  .rela.sbss2    : { *(.rela.sbss2)		}
53176617Smarcel
5478388Sbenno  .init      : { *(.init)    } =0
5578388Sbenno  .fini      : { *(.fini)    } =0
5637684Sdfr  .rodata    : { *(.rodata) *(.gnu.linkonce.r*) }
5737684Sdfr  .rodata1   : { *(.rodata1) }
5878388Sbenno  .sdata2    : { *(.sdata2)  }
5978388Sbenno  .sbss2     : { *(.sbss2)   }
6084665Smp  /* Adjust the address for the data segment to the next page up. */
6184665Smp  . = ((. + 0x1000) & ~(0x1000 - 1));
6237684Sdfr  .data    :
6337684Sdfr  {
6437684Sdfr    *(.data)
6537684Sdfr    *(.gnu.linkonce.d*)
6637684Sdfr  }
6737684Sdfr  .data1   : { *(.data1) }
6878388Sbenno  .got1           : { *(.got1) }
6978388Sbenno  .dynamic        : { *(.dynamic) }
7078388Sbenno  /* Put .ctors and .dtors next to the .got2 section, so that the pointers
7178388Sbenno     get relocated with -mrelocatable. Also put in the .fixup pointers.
7278388Sbenno     The current compiler no longer needs this, but keep it around for 2.7.2  */
7378388Sbenno                PROVIDE (_GOT2_START_ = .);
7478388Sbenno  .got2           :  { *(.got2) }
7578388Sbenno                PROVIDE (__CTOR_LIST__ = .);
7678388Sbenno  .ctors          : { *(.ctors) }
7778388Sbenno                PROVIDE (__CTOR_END__ = .);
7878388Sbenno                PROVIDE (__DTOR_LIST__ = .);
7978388Sbenno  .dtors          : { *(.dtors) }
8078388Sbenno                PROVIDE (__DTOR_END__ = .);
8178388Sbenno                PROVIDE (_FIXUP_START_ = .);
8278388Sbenno  .fixup          : { *(.fixup) }
8378388Sbenno                PROVIDE (_FIXUP_END_ = .);
8478388Sbenno                PROVIDE (_GOT2_END_ = .);
8578388Sbenno                PROVIDE (_GOT_START_ = .);
8678388Sbenno  .got            : { *(.got) }
8778388Sbenno  .got.plt        : { *(.got.plt) }
8878388Sbenno                PROVIDE (_GOT_END_ = .);
8937684Sdfr  /* We want the small data sections together, so single-instruction offsets
9037684Sdfr     can access them all, and initialized data all before uninitialized, so
9137684Sdfr     we can shorten the on-disk segment size.  */
9237684Sdfr  .sdata     : { *(.sdata) }
9337684Sdfr  _edata  =  .;
9437684Sdfr  PROVIDE (edata = .);
9578388Sbenno  .sbss      :
9678388Sbenno  {
9778388Sbenno    PROVIDE (__sbss_start = .);
9878388Sbenno    *(.sbss)
9978388Sbenno    *(.scommon)
10078388Sbenno    *(.dynsbss)
10178388Sbenno    PROVIDE (__sbss_end = .);
10278388Sbenno  }
10378388Sbenno  .plt   : { *(.plt) }
10437684Sdfr  .bss       :
10537684Sdfr  {
10678388Sbenno   PROVIDE (__bss_start = .);
10737684Sdfr   *(.dynbss)
10837684Sdfr   *(.bss)
10937684Sdfr   *(COMMON)
11037684Sdfr  }
11137684Sdfr  _end = . ;
11237684Sdfr  PROVIDE (end = .);
11337684Sdfr  /* Stabs debugging sections.  */
11437684Sdfr  .stab 0 : { *(.stab) }
11537684Sdfr  .stabstr 0 : { *(.stabstr) }
11637684Sdfr  /* DWARF debug sections.
11737684Sdfr     Symbols in the DWARF debugging sections are relative to the beginning
11837684Sdfr     of the section so we begin them at 0.  */
11937684Sdfr  /* DWARF 1 */
12037684Sdfr  .debug          0 : { *(.debug) }
12137684Sdfr  .line           0 : { *(.line) }
12237684Sdfr  /* GNU DWARF 1 extensions */
12337684Sdfr  .debug_srcinfo  0 : { *(.debug_srcinfo) }
12437684Sdfr  .debug_sfnames  0 : { *(.debug_sfnames) }
12537684Sdfr  /* DWARF 1.1 and DWARF 2 */
12637684Sdfr  .debug_aranges  0 : { *(.debug_aranges) }
12737684Sdfr  .debug_pubnames 0 : { *(.debug_pubnames) }
12837684Sdfr  /* DWARF 2 */
12937684Sdfr  .debug_info     0 : { *(.debug_info) }
13037684Sdfr  .debug_abbrev   0 : { *(.debug_abbrev) }
13137684Sdfr  .debug_line     0 : { *(.debug_line) }
13237684Sdfr  .debug_frame    0 : { *(.debug_frame) }
13337684Sdfr  .debug_str      0 : { *(.debug_str) }
13437684Sdfr  .debug_loc      0 : { *(.debug_loc) }
13537684Sdfr  .debug_macinfo  0 : { *(.debug_macinfo) }
13637684Sdfr  /* SGI/MIPS DWARF 2 extensions */
13737684Sdfr  .debug_weaknames 0 : { *(.debug_weaknames) }
13837684Sdfr  .debug_funcnames 0 : { *(.debug_funcnames) }
13937684Sdfr  .debug_typenames 0 : { *(.debug_typenames) }
14037684Sdfr  .debug_varnames  0 : { *(.debug_varnames) }
14137684Sdfr  /* These must appear regardless of  .  */
14237684Sdfr}
14337684Sdfr
144