xref: /freebsd/sys/conf/ldscript.arm (revision b56c0c673ab02a50bf713bb98da626bb6825272c)
178b36e3cSOlivier Houchard/* $FreeBSD$ */
278b36e3cSOlivier HouchardOUTPUT_ARCH(arm)
378b36e3cSOlivier HouchardENTRY(_start)
478b36e3cSOlivier Houchard
578b36e3cSOlivier HouchardSEARCH_DIR(/usr/lib);
678b36e3cSOlivier HouchardSECTIONS
778b36e3cSOlivier Houchard{
878b36e3cSOlivier Houchard  /* Read-only sections, merged into text segment: */
9c60e48e2SOlivier Houchard  . = KERNVIRTADDR + SIZEOF_HEADERS;
10f5a9ac9cSOlivier Houchard  .text      :
11f5a9ac9cSOlivier Houchard  {
12f5a9ac9cSOlivier Houchard    *(.text)
13f5a9ac9cSOlivier Houchard    *(.stub)
14f5a9ac9cSOlivier Houchard    /* .gnu.warning sections are handled specially by elf32.em.  */
15f5a9ac9cSOlivier Houchard    *(.gnu.warning)
16f5a9ac9cSOlivier Houchard    *(.gnu.linkonce.t*)
17f5a9ac9cSOlivier Houchard  } =0x9090
18f5a9ac9cSOlivier Houchard  _etext = .;
19f5a9ac9cSOlivier Houchard  PROVIDE (etext = .);
20f5a9ac9cSOlivier Houchard  .fini      : { *(.fini)    } =0x9090
21f5a9ac9cSOlivier Houchard  .rodata    : { *(.rodata) *(.gnu.linkonce.r*) }
22f5a9ac9cSOlivier Houchard  .rodata1   : { *(.rodata1) }
2378b36e3cSOlivier Houchard   .interp     : { *(.interp) 	}
2478b36e3cSOlivier Houchard  .hash          : { *(.hash)		}
2578b36e3cSOlivier Houchard  .dynsym        : { *(.dynsym)		}
2678b36e3cSOlivier Houchard  .dynstr        : { *(.dynstr)		}
2778b36e3cSOlivier Houchard  .gnu.version   : { *(.gnu.version)	}
2878b36e3cSOlivier Houchard  .gnu.version_d   : { *(.gnu.version_d)	}
2978b36e3cSOlivier Houchard  .gnu.version_r   : { *(.gnu.version_r)	}
3078b36e3cSOlivier Houchard  .rel.text      :
3178b36e3cSOlivier Houchard    { *(.rel.text) *(.rel.gnu.linkonce.t*) }
3278b36e3cSOlivier Houchard  .rela.text     :
3378b36e3cSOlivier Houchard    { *(.rela.text) *(.rela.gnu.linkonce.t*) }
3478b36e3cSOlivier Houchard  .rel.data      :
3578b36e3cSOlivier Houchard    { *(.rel.data) *(.rel.gnu.linkonce.d*) }
3678b36e3cSOlivier Houchard  .rela.data     :
3778b36e3cSOlivier Houchard    { *(.rela.data) *(.rela.gnu.linkonce.d*) }
3878b36e3cSOlivier Houchard  .rel.rodata    :
3978b36e3cSOlivier Houchard    { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
4078b36e3cSOlivier Houchard  .rela.rodata   :
4178b36e3cSOlivier Houchard    { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
4278b36e3cSOlivier Houchard  .rel.got       : { *(.rel.got)		}
4378b36e3cSOlivier Houchard  .rela.got      : { *(.rela.got)		}
4478b36e3cSOlivier Houchard  .rel.ctors     : { *(.rel.ctors)	}
4578b36e3cSOlivier Houchard  .rela.ctors    : { *(.rela.ctors)	}
4678b36e3cSOlivier Houchard  .rel.dtors     : { *(.rel.dtors)	}
4778b36e3cSOlivier Houchard  .rela.dtors    : { *(.rela.dtors)	}
4878b36e3cSOlivier Houchard  .rel.init      : { *(.rel.init)	}
4978b36e3cSOlivier Houchard  .rela.init     : { *(.rela.init)	}
5078b36e3cSOlivier Houchard  .rel.fini      : { *(.rel.fini)	}
5178b36e3cSOlivier Houchard  .rela.fini     : { *(.rela.fini)	}
5278b36e3cSOlivier Houchard  .rel.bss       : { *(.rel.bss)		}
5378b36e3cSOlivier Houchard  .rela.bss      : { *(.rela.bss)		}
5478b36e3cSOlivier Houchard  .rel.plt       : { *(.rel.plt)		}
5578b36e3cSOlivier Houchard  .rela.plt      : { *(.rela.plt)		}
5678b36e3cSOlivier Houchard  .init          : { *(.init)	} =0x9090
5778b36e3cSOlivier Houchard  .plt      : { *(.plt)	}
58f5a9ac9cSOlivier Houchard
59*b56c0c67SAndrew Turner  _extab_start = .;
60*b56c0c67SAndrew Turner  PROVIDE(extab_start = .);
61*b56c0c67SAndrew Turner  .ARM.extab : { *(.ARM.extab) }
62*b56c0c67SAndrew Turner  _extab.end = .;
63*b56c0c67SAndrew Turner  PROVIDE(extab_end = .);
64*b56c0c67SAndrew Turner
65*b56c0c67SAndrew Turner  _exidx_start = .;
66*b56c0c67SAndrew Turner  PROVIDE(exidx_start = .);
67*b56c0c67SAndrew Turner  .ARM.exidx : { *(.ARM.exidx) }
68*b56c0c67SAndrew Turner  _exidx_end = .;
69*b56c0c67SAndrew Turner  PROVIDE(exidx_end = .);
70*b56c0c67SAndrew Turner
7178b36e3cSOlivier Houchard  /* Adjust the address for the data segment.  We want to adjust up to
7278b36e3cSOlivier Houchard     the same address within the page on the next page up.  */
7378b36e3cSOlivier Houchard  . = ALIGN(0x1000) + (. & (0x1000 - 1)) ;
7478b36e3cSOlivier Houchard  .data    :
7578b36e3cSOlivier Houchard  {
7678b36e3cSOlivier Houchard    *(.data)
7778b36e3cSOlivier Houchard    *(.gnu.linkonce.d*)
7878b36e3cSOlivier Houchard    CONSTRUCTORS
7978b36e3cSOlivier Houchard  }
8078b36e3cSOlivier Houchard  .data1   : { *(.data1) }
8178b36e3cSOlivier Houchard  . = ALIGN(32 / 8);
8278b36e3cSOlivier Houchard  _start_ctors = .;
8378b36e3cSOlivier Houchard  PROVIDE (start_ctors = .);
8478b36e3cSOlivier Houchard  .ctors         :
8578b36e3cSOlivier Houchard  {
8678b36e3cSOlivier Houchard    *(.ctors)
8778b36e3cSOlivier Houchard  }
8878b36e3cSOlivier Houchard  _stop_ctors = .;
8978b36e3cSOlivier Houchard  PROVIDE (stop_ctors = .);
9078b36e3cSOlivier Houchard  .dtors         :
9178b36e3cSOlivier Houchard  {
9278b36e3cSOlivier Houchard    *(.dtors)
9378b36e3cSOlivier Houchard  }
9478b36e3cSOlivier Houchard  .got           : { *(.got.plt) *(.got) }
9578b36e3cSOlivier Houchard  .dynamic       : { *(.dynamic) }
9678b36e3cSOlivier Houchard  /* We want the small data sections together, so single-instruction offsets
9778b36e3cSOlivier Houchard     can access them all, and initialized data all before uninitialized, so
9878b36e3cSOlivier Houchard     we can shorten the on-disk segment size.  */
9978b36e3cSOlivier Houchard  .sdata     : { *(.sdata) }
10078b36e3cSOlivier Houchard  _edata  =  .;
10178b36e3cSOlivier Houchard  PROVIDE (edata = .);
10278b36e3cSOlivier Houchard  __bss_start = .;
10378b36e3cSOlivier Houchard  .sbss      : { *(.sbss) *(.scommon) }
10478b36e3cSOlivier Houchard  .bss       :
10578b36e3cSOlivier Houchard  {
10678b36e3cSOlivier Houchard   *(.dynbss)
10778b36e3cSOlivier Houchard   *(.bss)
10878b36e3cSOlivier Houchard   *(COMMON)
10978b36e3cSOlivier Houchard  }
11078b36e3cSOlivier Houchard  . = ALIGN(32 / 8);
11178b36e3cSOlivier Houchard  _end = . ;
11278b36e3cSOlivier Houchard  PROVIDE (end = .);
11378b36e3cSOlivier Houchard  /* Stabs debugging sections.  */
11478b36e3cSOlivier Houchard  .stab 0 : { *(.stab) }
11578b36e3cSOlivier Houchard  .stabstr 0 : { *(.stabstr) }
11678b36e3cSOlivier Houchard  .stab.excl 0 : { *(.stab.excl) }
11778b36e3cSOlivier Houchard  .stab.exclstr 0 : { *(.stab.exclstr) }
11878b36e3cSOlivier Houchard  .stab.index 0 : { *(.stab.index) }
11978b36e3cSOlivier Houchard  .stab.indexstr 0 : { *(.stab.indexstr) }
12078b36e3cSOlivier Houchard  .comment 0 : { *(.comment) }
12178b36e3cSOlivier Houchard  /* DWARF debug sections.
12278b36e3cSOlivier Houchard     Symbols in the DWARF debugging sections are relative to the beginning
12378b36e3cSOlivier Houchard     of the section so we begin them at 0.  */
12478b36e3cSOlivier Houchard  /* DWARF 1 */
12578b36e3cSOlivier Houchard  .debug          0 : { *(.debug) }
12678b36e3cSOlivier Houchard  .line           0 : { *(.line) }
12778b36e3cSOlivier Houchard  /* GNU DWARF 1 extensions */
12878b36e3cSOlivier Houchard  .debug_srcinfo  0 : { *(.debug_srcinfo) }
12978b36e3cSOlivier Houchard  .debug_sfnames  0 : { *(.debug_sfnames) }
13078b36e3cSOlivier Houchard  /* DWARF 1.1 and DWARF 2 */
13178b36e3cSOlivier Houchard  .debug_aranges  0 : { *(.debug_aranges) }
13278b36e3cSOlivier Houchard  .debug_pubnames 0 : { *(.debug_pubnames) }
13378b36e3cSOlivier Houchard  /* DWARF 2 */
13478b36e3cSOlivier Houchard  .debug_info     0 : { *(.debug_info) }
13578b36e3cSOlivier Houchard  .debug_abbrev   0 : { *(.debug_abbrev) }
13678b36e3cSOlivier Houchard  .debug_line     0 : { *(.debug_line) }
13778b36e3cSOlivier Houchard  .debug_frame    0 : { *(.debug_frame) }
13878b36e3cSOlivier Houchard  .debug_str      0 : { *(.debug_str) }
13978b36e3cSOlivier Houchard  .debug_loc      0 : { *(.debug_loc) }
14078b36e3cSOlivier Houchard  .debug_macinfo  0 : { *(.debug_macinfo) }
14178b36e3cSOlivier Houchard  /* SGI/MIPS DWARF 2 extensions */
14278b36e3cSOlivier Houchard  .debug_weaknames 0 : { *(.debug_weaknames) }
14378b36e3cSOlivier Houchard  .debug_funcnames 0 : { *(.debug_funcnames) }
14478b36e3cSOlivier Houchard  .debug_typenames 0 : { *(.debug_typenames) }
14578b36e3cSOlivier Houchard  .debug_varnames  0 : { *(.debug_varnames) }
14678b36e3cSOlivier Houchard  /* These must appear regardless of  .  */
14778b36e3cSOlivier Houchard}
148