aboutsummaryrefslogblamecommitdiffstats
path: root/erts/emulator/sys/ose/gcc_lm_x86_4.6.3.lcf
blob: bb357afcb1e6be28d1f079dc3558fd9676a024c1 (plain) (tree)



























































































































































































































































                                                                                
/*******************************************************************************
 * gcc_lm_x86.lcf: GCC linker control file for x86 load modules
 * @(#) $FilePath:   /vobs/ose5/system/refsys/compilers/gcc_lm_x86.lcf  $
 * @(#) $FileRevision:   /main/tb_current_ose5/9  $
 * $Author:   rand  $$Date:   10/29/12 17:45:04  $
 * $Copyright:   (C) 2006 by Enea AB. All rights reserved.  $
 ******************************************************************************/

OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
OUTPUT_ARCH("i386")

ENTRY("crt0_lm")

/* Note:
 * You may have to increase the length of the "rom" memory region below
 * depending on the size of the code and data in your load module.
 */

MEMORY
{
	conf : ORIGIN = 0x00300000, LENGTH = 0x00001000
	rom  : ORIGIN = 0x00000000, LENGTH = 0x00300000
}

PHDRS
{
	ph_conf PT_LOAD ;
	ph_rom PT_LOAD ;
	ph_ram PT_LOAD ;
}

SECTIONS
{
/*---------------------------------------------------------------------------
 *		Load module configuration area
 *-------------------------------------------------------------------------*/

	/* Load module configuration section. */
	LMCONF :
	{
		dummy = ALIGN(0x10000);
		*/?*?/*ose_confd.o(LMCONF*)
		*(LMCONF*)
		*ose_confd.o(.rodata)
	} > conf :ph_conf

/*---------------------------------------------------------------------------
 *		Read-only area
 *-------------------------------------------------------------------------*/

	/* Init section. */
	.init :
	{
		KEEP(*(.init))
	} > rom :ph_rom = 0x90909090

	/* Code section. */
	.text :
	{
		*(.text)
		*(.text.*)
		*(.stub)
		*(oscode)
		*(.init*)
		*(.fini*)
		*(.gnu.warning)
		*(.gnu.linkonce.t.*)
	} > rom :ph_rom = 0

	/* Read-only data section. */
	.rodata :
	{
		*(.rodata)
		*(.rodata.*)
		*(.gnu.linkonce.r.*)
	} > rom :ph_rom

	/* OSE symbols section. */
	OSESYMS :
	{
		*(.osesyms)
	} > rom :ph_rom

	/* Procedure linkage table section. */
	.plt :
	{
		*(.plt)
		*(.iplt)
	} > rom :ph_rom

	/* Dynamic relocations */
	.rel.dyn :
	{
		*(.rel.init)
		*(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
		*(.rel.fini)
		*(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
		*(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*)
		*(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
		*(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
		*(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
		*(.rel.ctors)
		*(.rel.dtors)
		*(.rel.got)
		*(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
		*(.rel.ifunc)
	} > rom :ph_rom

/*---------------------------------------------------------------------------
 *		Read-write area
 *-------------------------------------------------------------------------*/

	/* C++ constructor section. */
	.ctors :
	{
		__CTOR_LIST__ = .;
		*(.ctors)
		*(SORT(.ctors.*))
		__CTOR_END__ = .;
	} > rom :ph_rom

	/* C++ destructor section. */
	.dtors :
	{
		__DTOR_LIST__ = .;
		*(.dtors)
		*(SORT(.dtors.*))
		__DTOR_END__ = .;
	} > rom :ph_rom

	/* C++ exception handling section. */
	.eh_frame :
	{
		__EH_FRAME_BEGIN__ = .;
		*(.eh_frame)
		LONG(0)
		__EH_FRAME_END__ = .;
	} > rom :ph_rom

	/*-------------------------------------------------------------------
	 * Initialized data (copied by PM)
	 *-----------------------------------------------------------------*/

	/* Data section. */
	.data :
	{
		*(.data)
		*(.data.*)
		*(.gnu.linkonce.d.*)
		SORT(CONSTRUCTORS)
	} > rom :ph_ram

	/* Global offset table section. */
	.got :
	{
		*(.got.plt)
		*(.got)
	} > rom :ph_ram

	/* Global offset table for dynamically linked procedures. */
	.got.plt :
	{
		*(.got.plt)
		*(.igot.plt)
	} > rom :ph_ram

	/* SFK BIOS entry section. */
	.ose_sfk_biosentry :
	{
		*(.ose_sfk_biosentry)
	} > rom :ph_ram

	/* C++ exception handling section. */
	.gcc_except_table :
	{
		*(.gcc_except_table .gcc_except_table.*)
	} > rom :ph_ram

	/* Small data section. */
	.sdata ALIGN(0x10) :
	{
		PROVIDE (_SDA_BASE_ = .);
		*(.sdata)
		*(.sdata.*)
		*(.gnu.linkonce.s.*)
	} > rom :ph_ram

	/*-------------------------------------------------------------------
	 * Uninitialized data (cleared by PM)
	 *-----------------------------------------------------------------*/

	/* Bss section. */
	.bss :
	{
		*(.bss)
		*(.bss.*)
		*(COMMON)
		*(.gnu.linkonce.b.*)
	} > rom :ph_ram

	/* Small bss section. */
	.sbss ALIGN(0x10) :
	{
		*(.sbss)
		*(.sbss.*)
		*(.scommon)
		*(.gnu.linkonce.sb.*)
	} > rom :ph_ram

/*---------------------------------------------------------------------------
 *		Debug information
 *-------------------------------------------------------------------------*/

	/*
	 * Stabs debug sections.
	 */

	.stab            0 : { *(.stab) }
	.stabstr         0 : { *(.stabstr) }
	.stab.excl       0 : { *(.stab.excl) }
	.stab.exclstr    0 : { *(.stab.exclstr) }
	.stab.index      0 : { *(.stab.index) }
	.stab.indexstr   0 : { *(.stab.indexstr) }
	.comment         0 : { *(.comment) }

	/*
	 * DWARF debug sections.
	 */

	/* DWARF 1 */
	.debug           0 : { *(.debug) }
	.line            0 : { *(.line) }
	/* GNU DWARF 1 extensions */
	.debug_srcinfo   0 : { *(.debug_srcinfo) }
	.debug_sfnames   0 : { *(.debug_sfnames) }
	/* DWARF 1.1 and DWARF 2 */
	.debug_aranges   0 : { *(.debug_aranges) }
	.debug_pubnames  0 : { *(.debug_pubnames) }
	/* DWARF 2 */
	.debug_info      0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
	.debug_abbrev    0 : { *(.debug_abbrev) }
	.debug_line      0 : { *(.debug_line) }
	.debug_frame     0 : { *(.debug_frame) }
	.debug_str       0 : { *(.debug_str) }
	.debug_loc       0 : { *(.debug_loc) }
	.debug_macinfo   0 : { *(.debug_macinfo) }
	/* SGI/MIPS DWARF 2 extensions */
	.debug_weaknames 0 : { *(.debug_weaknames) }
	.debug_funcnames 0 : { *(.debug_funcnames) }
	.debug_typenames 0 : { *(.debug_typenames) }
	.debug_varnames  0 : { *(.debug_varnames) }
}