xref: /netbsd-src/sys/arch/mips/conf/stand.ldscript (revision 014425532669055787df0331b6c3600cbe505d13)
1/* $NetBSD: stand.ldscript,v 1.8 2021/04/23 08:42:25 simonb Exp $ */
2
3/*  ldscript for NetBSD/mips stand-alone programs */
4OUTPUT_ARCH(mips)
5ENTRY(_start)
6SECTIONS
7{
8  /*  Read-only sections, merged into text segment.  Assumes the
9      stand Makefile sets the start address via -Ttext.  */
10  .text      :
11  {
12    _ftext = . ;
13    *(.text)
14    *(.text.*)
15    *(.gnu.warning)
16  } =0
17  _etext = .;
18  PROVIDE (etext = .);
19  .rodata    : { *(.rodata) *(.rodata.*) }
20  .data    :
21  {
22    _fdata = . ;
23    *(.data)
24    CONSTRUCTORS
25  }
26  _gp = ALIGN(16);
27  .lit8 : { *(.lit8) }
28  .lit4 : { *(.lit4) }
29  .sdata     : { *(.sdata) }
30  _edata  =  .;
31  PROVIDE (edata = .);
32  __bss_start = .;
33  _fbss = .;
34  .sbss      : { *(.sbss) *(.scommon) }
35  .bss       :
36  {
37    *(.bss)
38    *(COMMON)
39  }
40  _end = . ;
41  PROVIDE (end = .);
42  /DISCARD/ : {
43    *(.eh_frame_hdr)
44    *(.eh_frame)
45  }
46}
47