forked from Imagelibrary/rtems
2011-08-31 Sebastian Huber <sebastian.huber@embedded-brains.de>
* shared/startup/linkcmds.base: New file.
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2011-08-31 Sebastian Huber <sebastian.huber@embedded-brains.de>
|
||||
|
||||
* shared/startup/linkcmds.base: New file.
|
||||
|
||||
2011-08-24 Sebastian Huber <sebastian.huber@embedded-brains.de>
|
||||
|
||||
* shared/bootloader/exception.S, shared/bootloader/misc.c,
|
||||
|
||||
375
c/src/lib/libbsp/powerpc/shared/startup/linkcmds.base
Normal file
375
c/src/lib/libbsp/powerpc/shared/startup/linkcmds.base
Normal file
@@ -0,0 +1,375 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @ingroup bsp_linker
|
||||
*
|
||||
* @brief Linker command base file.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2011 embedded brains GmbH. All rights reserved.
|
||||
*
|
||||
* embedded brains GmbH
|
||||
* Obere Lagerstr. 30
|
||||
* 82178 Puchheim
|
||||
* Germany
|
||||
* <rtems@embedded-brains.de>
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*/
|
||||
|
||||
OUTPUT_FORMAT ("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")
|
||||
|
||||
OUTPUT_ARCH (powerpc:common)
|
||||
|
||||
ENTRY (_start)
|
||||
|
||||
/*
|
||||
* Global symbols that may be defined externally
|
||||
*/
|
||||
|
||||
bsp_section_xbarrier_align = DEFINED (bsp_section_xbarrier_align) ? bsp_section_xbarrier_align : 1;
|
||||
bsp_section_robarrier_align = DEFINED (bsp_section_robarrier_align) ? bsp_section_robarrier_align : 1;
|
||||
bsp_section_rwbarrier_align = DEFINED (bsp_section_rwbarrier_align) ? bsp_section_rwbarrier_align : 1;
|
||||
|
||||
SECTIONS {
|
||||
.start : {
|
||||
bsp_section_start_begin = .;
|
||||
KEEP (*(.bsp_start_text))
|
||||
KEEP (*(.bsp_start_data))
|
||||
bsp_section_start_end = .;
|
||||
} > REGION_START AT > REGION_START
|
||||
bsp_section_start_size = bsp_section_start_end - bsp_section_start_begin;
|
||||
|
||||
.xbarrier : {
|
||||
. = ALIGN (bsp_section_xbarrier_align);
|
||||
} > REGION_TEXT
|
||||
|
||||
.fast_text : {
|
||||
bsp_section_fast_text_begin = .;
|
||||
*(.bsp_fast_text)
|
||||
bsp_section_fast_text_end = .;
|
||||
} > REGION_FAST_TEXT AT > REGION_FAST_TEXT_LOAD
|
||||
bsp_section_fast_text_size = bsp_section_fast_text_end - bsp_section_fast_text_begin;
|
||||
bsp_section_fast_text_load_begin = LOADADDR (.fast_text);
|
||||
bsp_section_fast_text_load_end = bsp_section_fast_text_load_begin + bsp_section_fast_text_size;
|
||||
|
||||
.text : {
|
||||
bsp_section_text_begin = .;
|
||||
*(.text.unlikely .text.*_unlikely)
|
||||
*(.text .stub .text.* .gnu.linkonce.t.*)
|
||||
*(.gnu.warning)
|
||||
*(.glink)
|
||||
} > REGION_TEXT AT > REGION_TEXT_LOAD
|
||||
.init : {
|
||||
KEEP (*(.init))
|
||||
} > REGION_TEXT AT > REGION_TEXT_LOAD
|
||||
.fini : {
|
||||
PROVIDE (_fini = .);
|
||||
KEEP (*(.fini))
|
||||
bsp_section_text_end = .;
|
||||
} > REGION_TEXT AT > REGION_TEXT_LOAD
|
||||
bsp_section_text_size = bsp_section_text_end - bsp_section_text_begin;
|
||||
bsp_section_text_load_begin = LOADADDR (.text);
|
||||
bsp_section_text_load_end = bsp_section_text_load_begin + bsp_section_text_size;
|
||||
|
||||
.robarrier : {
|
||||
. = ALIGN (bsp_section_robarrier_align);
|
||||
} > REGION_RODATA
|
||||
|
||||
.rodata : {
|
||||
bsp_section_rodata_begin = .;
|
||||
*(.rodata .rodata.* .gnu.linkonce.r.*)
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.rodata1 : {
|
||||
*(.rodata1)
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.sdata2 : {
|
||||
PROVIDE (_SDA2_BASE_ = 32768);
|
||||
*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.sbss2 : {
|
||||
*(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.eh_frame_hdr : {
|
||||
*(.eh_frame_hdr)
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.eh_frame : {
|
||||
KEEP (*(.eh_frame))
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.gcc_except_table : {
|
||||
*(.gcc_except_table .gcc_except_table.*)
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.tdata : {
|
||||
*(.tdata .tdata.* .gnu.linkonce.td.*)
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.tbss : {
|
||||
*(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.preinit_array : {
|
||||
PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||
KEEP (*(.preinit_array))
|
||||
PROVIDE_HIDDEN (__preinit_array_end = .);
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.init_array : {
|
||||
PROVIDE_HIDDEN (__init_array_start = .);
|
||||
KEEP (*(SORT(.init_array.*)))
|
||||
KEEP (*(.init_array))
|
||||
PROVIDE_HIDDEN (__init_array_end = .);
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.fini_array : {
|
||||
PROVIDE_HIDDEN (__fini_array_start = .);
|
||||
KEEP (*(SORT(.fini_array.*)))
|
||||
KEEP (*(.fini_array))
|
||||
PROVIDE_HIDDEN (__fini_array_end = .);
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.ctors : {
|
||||
KEEP (*crtbegin.o(.ctors))
|
||||
KEEP (*crtbegin?.o(.ctors))
|
||||
KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
|
||||
KEEP (*(SORT(.ctors.*)))
|
||||
KEEP (*(.ctors))
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.dtors : {
|
||||
KEEP (*crtbegin.o(.dtors))
|
||||
KEEP (*crtbegin?.o(.dtors))
|
||||
KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
|
||||
KEEP (*(SORT(.dtors.*)))
|
||||
KEEP (*(.dtors))
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.jcr : {
|
||||
KEEP (*(.jcr))
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.data.rel.ro : {
|
||||
*(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*)
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.fixup : {
|
||||
*(.fixup)
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.dynamic : {
|
||||
*(.dynamic)
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.got1 : {
|
||||
*(.got1)
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.got2 : {
|
||||
*(.got2)
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.got : {
|
||||
*(.got)
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.plt : {
|
||||
*(.plt)
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.iplt : {
|
||||
*(.iplt)
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.interp : {
|
||||
*(.interp)
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.note.gnu.build-id : {
|
||||
*(.note.gnu.build-id)
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.hash : {
|
||||
*(.hash)
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.gnu.hash : {
|
||||
*(.gnu.hash)
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.dynsym : {
|
||||
*(.dynsym)
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.dynstr : {
|
||||
*(.dynstr)
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.gnu.version : {
|
||||
*(.gnu.version)
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.gnu.version_d : {
|
||||
*(.gnu.version_d)
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.gnu.version_r : {
|
||||
*(.gnu.version_r)
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.rela.dyn : {
|
||||
*(.rela.init)
|
||||
*(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
|
||||
*(.rela.fini)
|
||||
*(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
|
||||
*(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
|
||||
*(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
|
||||
*(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
|
||||
*(.rela.ctors)
|
||||
*(.rela.dtors)
|
||||
*(.rela.got)
|
||||
*(.rela.got1)
|
||||
*(.rela.got2)
|
||||
*(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
|
||||
*(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
|
||||
*(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
|
||||
*(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
|
||||
*(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
|
||||
PROVIDE_HIDDEN (__rel_iplt_start = .);
|
||||
PROVIDE_HIDDEN (__rel_iplt_end = .);
|
||||
PROVIDE_HIDDEN (__rela_iplt_start = .);
|
||||
*(.rela.iplt)
|
||||
PROVIDE_HIDDEN (__rela_iplt_end = .);
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.rela.plt : {
|
||||
*(.rela.plt)
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
.robsdsets : {
|
||||
/* Special FreeBSD linker set sections */
|
||||
__start_set_sysctl_set = .;
|
||||
*(set_sysctl_*);
|
||||
__stop_set_sysctl_set = .;
|
||||
*(set_domain_*);
|
||||
*(set_pseudo_*);
|
||||
_bsd__start_set_modmetadata_set = .;
|
||||
*(_bsd_set_modmetadata_set);
|
||||
_bsd__stop_set_modmetadata_set = .;
|
||||
_bsd__start_set_sysctl_set = .;
|
||||
*(_bsd_set_sysctl_set);
|
||||
_bsd__stop_set_sysctl_set = .;
|
||||
|
||||
bsp_section_rodata_end = .;
|
||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||
bsp_section_rodata_size = bsp_section_rodata_end - bsp_section_rodata_begin;
|
||||
bsp_section_rodata_load_begin = LOADADDR (.rodata);
|
||||
bsp_section_rodata_load_end = bsp_section_rodata_load_begin + bsp_section_rodata_size;
|
||||
|
||||
.rwbarrier : {
|
||||
. = ALIGN (bsp_section_rwbarrier_align);
|
||||
} > REGION_DATA
|
||||
|
||||
.fast_data : {
|
||||
bsp_section_fast_data_begin = .;
|
||||
*(.bsp_fast_data)
|
||||
bsp_section_fast_data_end = .;
|
||||
} > REGION_FAST_DATA AT > REGION_FAST_DATA_LOAD
|
||||
bsp_section_fast_data_size = bsp_section_fast_data_end - bsp_section_fast_data_begin;
|
||||
bsp_section_fast_data_load_begin = LOADADDR (.fast_data);
|
||||
bsp_section_fast_data_load_end = bsp_section_fast_data_load_begin + bsp_section_fast_data_size;
|
||||
|
||||
.data : {
|
||||
bsp_section_data_begin = .;
|
||||
*(.data .data.* .gnu.linkonce.d.*)
|
||||
SORT(CONSTRUCTORS)
|
||||
} > REGION_DATA AT > REGION_DATA_LOAD
|
||||
.data1 : {
|
||||
*(.data1)
|
||||
} > REGION_DATA AT > REGION_DATA_LOAD
|
||||
.rwbsdsets : {
|
||||
/* Special FreeBSD linker set sections */
|
||||
_bsd__start_set_sysinit_set = .;
|
||||
*(_bsd_set_sysinit_set);
|
||||
_bsd__stop_set_sysinit_set = .;
|
||||
} > REGION_DATA AT > REGION_DATA_LOAD
|
||||
.sdata : {
|
||||
PROVIDE (_SDA_BASE_ = 32768);
|
||||
*(.sdata .sdata.* .gnu.linkonce.s.*)
|
||||
bsp_section_data_end = .;
|
||||
} > REGION_DATA AT > REGION_DATA_LOAD
|
||||
bsp_section_data_size = bsp_section_data_end - bsp_section_data_begin;
|
||||
bsp_section_data_load_begin = LOADADDR (.data);
|
||||
bsp_section_data_load_end = bsp_section_data_load_begin + bsp_section_data_size;
|
||||
|
||||
.sbss : {
|
||||
bsp_section_sbss_begin = .;
|
||||
*(.dynsbss)
|
||||
*(.sbss .sbss.* .gnu.linkonce.sb.*)
|
||||
*(.scommon)
|
||||
bsp_section_sbss_end = .;
|
||||
} > REGION_DATA AT > REGION_DATA
|
||||
bsp_section_sbss_size = bsp_section_sbss_end - bsp_section_sbss_begin;
|
||||
|
||||
.bss : {
|
||||
bsp_section_bss_begin = .;
|
||||
*(.dynbss)
|
||||
*(.bss .bss.* .gnu.linkonce.b.*)
|
||||
*(COMMON)
|
||||
bsp_section_bss_end = .;
|
||||
} > REGION_BSS AT > REGION_BSS
|
||||
bsp_section_bss_size = bsp_section_bss_end - bsp_section_bss_begin;
|
||||
|
||||
.rwextra : {
|
||||
bsp_section_rwextra_begin = .;
|
||||
*(.bsp_rwextra)
|
||||
bsp_section_rwextra_end = .;
|
||||
} > REGION_RWEXTRA AT > REGION_RWEXTRA
|
||||
bsp_section_rwextra_size = bsp_section_rwextra_end - bsp_section_rwextra_begin;
|
||||
|
||||
.work : {
|
||||
/*
|
||||
* The work section will occupy the remaining REGION_WORK region and
|
||||
* contains the RTEMS work space and heap.
|
||||
*/
|
||||
bsp_section_work_begin = .;
|
||||
. += ORIGIN (REGION_WORK) + LENGTH (REGION_WORK) - ABSOLUTE (.);
|
||||
bsp_section_work_end = .;
|
||||
} > REGION_WORK AT > REGION_WORK
|
||||
bsp_section_work_size = bsp_section_work_end - bsp_section_work_begin;
|
||||
|
||||
.stack : {
|
||||
/*
|
||||
* The stack section will occupy the remaining REGION_STACK region and may
|
||||
* contain the task stacks. Depending on the region distribution this
|
||||
* section may be of zero size.
|
||||
*/
|
||||
bsp_section_stack_begin = .;
|
||||
. += ORIGIN (REGION_STACK) + LENGTH (REGION_STACK) - ABSOLUTE (.);
|
||||
bsp_section_stack_end = .;
|
||||
} > REGION_STACK AT > REGION_STACK
|
||||
bsp_section_stack_size = bsp_section_stack_end - bsp_section_stack_begin;
|
||||
|
||||
/* FIXME */
|
||||
RamBase = ORIGIN (REGION_WORK);
|
||||
RamSize = LENGTH (REGION_WORK);
|
||||
WorkAreaBase = bsp_section_work_begin;
|
||||
HeapSize = 0;
|
||||
|
||||
/* Stabs debugging 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.
|
||||
Symbols in the DWARF debugging sections are relative to the beginning
|
||||
of the section so we begin them at 0. */
|
||||
/* DWARF 1 */
|
||||
.debug 0 : { *(.debug) }
|
||||
.line 0 : { *(.line) }
|
||||
/* GNU DWARF 1 extensions */
|
||||
.debug_srcinfo 0 : { *(.debug_srcinfo .zdebug_srcinfo) }
|
||||
.debug_sfnames 0 : { *(.debug_sfnames .zdebug_sfnames) }
|
||||
/* DWARF 1.1 and DWARF 2 */
|
||||
.debug_aranges 0 : { *(.debug_aranges .zdebug_aranges) }
|
||||
.debug_pubnames 0 : { *(.debug_pubnames .zdebug_pubnames) }
|
||||
/* DWARF 2 */
|
||||
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.* .zdebug_info) }
|
||||
.debug_abbrev 0 : { *(.debug_abbrev .zdebug_abbrev) }
|
||||
.debug_line 0 : { *(.debug_line .zdebug_line) }
|
||||
.debug_frame 0 : { *(.debug_frame .zdebug_frame) }
|
||||
.debug_str 0 : { *(.debug_str .zdebug_str) }
|
||||
.debug_loc 0 : { *(.debug_loc .zdebug_loc) }
|
||||
.debug_macinfo 0 : { *(.debug_macinfo .zdebug_macinfo) }
|
||||
/* SGI/MIPS DWARF 2 extensions */
|
||||
.debug_weaknames 0 : { *(.debug_weaknames .zdebug_weaknames) }
|
||||
.debug_funcnames 0 : { *(.debug_funcnames .zdebug_funcnames) }
|
||||
.debug_typenames 0 : { *(.debug_typenames .zdebug_typenames) }
|
||||
.debug_varnames 0 : { *(.debug_varnames .zdebug_varnames) }
|
||||
/* DWARF 3 */
|
||||
.debug_pubtypes 0 : { *(.debug_pubtypes .zdebug_pubtypes) }
|
||||
.debug_ranges 0 : { *(.debug_ranges .zdebug_ranges) }
|
||||
.gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
|
||||
.PPC.EMB.apuinfo 0 : { *(.PPC.EMB.apuinfo) }
|
||||
/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }
|
||||
|
||||
/* Catch all unknown sections */
|
||||
.nirvana : { *(*) } > NIRVANA
|
||||
}
|
||||
Reference in New Issue
Block a user