forked from Imagelibrary/rtems
committed by
Sebastian Huber
parent
2858939a2c
commit
f7c47a6880
@@ -2,8 +2,6 @@
|
||||
AC_DEFUN([RTEMS_CHECK_BSPDIR],
|
||||
[
|
||||
case "$1" in
|
||||
m32rsim )
|
||||
AC_CONFIG_SUBDIRS([m32rsim]);;
|
||||
*)
|
||||
AC_MSG_ERROR([Invalid BSP]);;
|
||||
esac
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
ACLOCAL_AMFLAGS = -I ../../../../aclocal
|
||||
|
||||
include $(top_srcdir)/../../../../automake/compile.am
|
||||
include $(top_srcdir)/../../bsp.am
|
||||
|
||||
include_bspdir = $(includedir)/bsp
|
||||
|
||||
dist_project_lib_DATA = bsp_specs
|
||||
|
||||
include_HEADERS = include/bsp.h
|
||||
include_HEADERS += include/tm27.h
|
||||
|
||||
nodist_include_HEADERS = include/bspopts.h
|
||||
nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h
|
||||
nodist_include_bsp_HEADERS += ../../shared/include/console-polled.h
|
||||
DISTCLEANFILES = include/bspopts.h
|
||||
noinst_PROGRAMS =
|
||||
|
||||
nodist_include_HEADERS += ../../shared/include/coverhd.h
|
||||
|
||||
EXTRA_DIST = start/start.S
|
||||
start.$(OBJEXT): start/start.S
|
||||
$(CPPASCOMPILE) -o $@ -c $<
|
||||
project_lib_DATA = start.$(OBJEXT)
|
||||
|
||||
dist_project_lib_DATA += startup/linkcmds
|
||||
|
||||
startup_SOURCES = ../../shared/bspclean.c ../../shared/bsplibc.c \
|
||||
../../shared/bsppredriverhook.c \
|
||||
../../shared/bspgetworkarea.c ../../shared/bsppost.c \
|
||||
../../shared/bspstart.c ../../shared/bootcard.c ../../shared/sbrk.c \
|
||||
../../shared/gnatinstallhandler.c startup/bspreset.c
|
||||
clock_SOURCES = ../../shared/clock_driver_simidle.c
|
||||
console_SOURCES = ../../shared/console-polled.c console/console-io.c \
|
||||
console/trap0.S
|
||||
timer_SOURCES = ../../shared/timerstub.c
|
||||
|
||||
noinst_LIBRARIES = libbsp.a
|
||||
libbsp_a_SOURCES = $(startup_SOURCES) $(clock_SOURCES) $(console_SOURCES) \
|
||||
$(timer_SOURCES)
|
||||
|
||||
# Cache
|
||||
libbsp_a_SOURCES += ../../../libcpu/shared/src/cache_manager.c
|
||||
libbsp_a_SOURCES += ../../shared/include/cache_.h
|
||||
libbsp_a_CPPFLAGS = -I$(srcdir)/../../shared/include
|
||||
|
||||
include $(srcdir)/preinstall.am
|
||||
include $(top_srcdir)/../../../../automake/local.am
|
||||
@@ -1,13 +0,0 @@
|
||||
%rename endfile old_endfile
|
||||
%rename startfile old_startfile
|
||||
%rename link old_link
|
||||
|
||||
*startfile:
|
||||
%{!qrtems: %(old_startfile)} \
|
||||
%{!nostdlib: %{qrtems: start.o%s crtinit.o%s crtbegin.o%s -e _start}}
|
||||
|
||||
*link:
|
||||
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
|
||||
|
||||
*endfile:
|
||||
%{!qrtems: %(old_endfiles)} %{qrtems: crtend.o%s crtfini.o%s }
|
||||
@@ -1,20 +0,0 @@
|
||||
## Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ([2.69])
|
||||
AC_INIT([rtems-c-src-lib-libbsp-h8300-h8sim],[_RTEMS_VERSION],[https://devel.rtems.org/newticket])
|
||||
AC_CONFIG_SRCDIR([bsp_specs])
|
||||
RTEMS_TOP(../../../../../..)
|
||||
|
||||
RTEMS_CANONICAL_TARGET_CPU
|
||||
AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.12.2])
|
||||
RTEMS_BSP_CONFIGURE
|
||||
|
||||
RTEMS_PROG_CC_FOR_TARGET
|
||||
RTEMS_CANONICALIZE_TOOLS
|
||||
RTEMS_PROG_CCAS
|
||||
|
||||
RTEMS_BSP_CLEANUP_OPTIONS(0, 1)
|
||||
|
||||
# Explicitly list all Makefiles here
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_OUTPUT
|
||||
@@ -1,60 +0,0 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2011.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.org/license/LICENSE.
|
||||
*/
|
||||
|
||||
#include <bsp.h>
|
||||
#include <bsp/console-polled.h>
|
||||
#include <rtems/libio.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <reent.h>
|
||||
|
||||
/*
|
||||
* console_initialize_hardware
|
||||
*
|
||||
* This routine initializes the console hardware.
|
||||
*
|
||||
*/
|
||||
|
||||
void console_initialize_hardware(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* console_outbyte_polled
|
||||
*
|
||||
* This routine transmits a character using polling.
|
||||
*/
|
||||
void console_outbyte_polled(
|
||||
int port,
|
||||
char ch
|
||||
)
|
||||
{
|
||||
TRAP0(SYS_write, 1, &ch, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
* console_inbyte_nonblocking
|
||||
*
|
||||
* This routine polls for a character.
|
||||
*/
|
||||
|
||||
int console_inbyte_nonblocking(
|
||||
int port
|
||||
)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
#include <rtems/bspIo.h>
|
||||
|
||||
static void console_output_char(char c) { console_outbyte_polled( 0, c ); }
|
||||
|
||||
BSP_output_char_function_type BSP_output_char = console_output_char;
|
||||
BSP_polling_getchar_function_type BSP_poll_char = NULL;
|
||||
@@ -1,41 +0,0 @@
|
||||
/*
|
||||
* System call support for simulator in gdb.
|
||||
* Adapted from newlib 1.16.0.
|
||||
*/
|
||||
|
||||
#define SYS_exit 1
|
||||
#define SYS_open 2
|
||||
#define SYS_close 3
|
||||
#define SYS_read 4
|
||||
#define SYS_write 5
|
||||
#define SYS_lseek 6
|
||||
#define SYS_unlink 7
|
||||
#define SYS_getpid 8
|
||||
#define SYS_kill 9
|
||||
#define SYS_fstat 10
|
||||
|
||||
#define POUND #
|
||||
#define SYSCALL(N) mov.b POUND N,0x400
|
||||
|
||||
#define S(n) _sys_##n: .global _sys_##n | SYSCALL(SYS_##n) | rts
|
||||
|
||||
S(write)
|
||||
S(exit)
|
||||
|
||||
.global _abort
|
||||
_abort:
|
||||
/* This is for debuggers. The simulator stops here too. */
|
||||
brk
|
||||
|
||||
/* Else, fall back on the simulator's "kill me" option. */
|
||||
#if defined(__r8c_cpu__) || defined(__m16c_cpu__)
|
||||
mov.w #42,r1
|
||||
#else
|
||||
mov.w #42,r0
|
||||
#endif
|
||||
|
||||
SYSCALL(SYS_kill)
|
||||
|
||||
/* Else, exit. */
|
||||
jmp.a __exit
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
; Trap 0 handler (syscall interface).
|
||||
;
|
||||
; The trap handler returns the result in r0 and the error code (errno value)
|
||||
; in r2. r1 is reserved in case an 8 byte quantity ever needs to be
|
||||
; returned in registers.
|
||||
|
||||
.text
|
||||
.global __trap0
|
||||
__trap0:
|
||||
trap #0 ; trap 0 returns result in r0, error code in r2
|
||||
cmpui r2,#1 ; is error code zero?
|
||||
bc .Lret ; yes, skip setting errno
|
||||
ld r4,@(sp) ; no, set errno
|
||||
st r2,@r4
|
||||
.Lret:
|
||||
jmp lr ; return to caller
|
||||
@@ -1,15 +0,0 @@
|
||||
/**
|
||||
* @defgroup bsp_m32r M32R
|
||||
*
|
||||
* @ingroup bsp_kit
|
||||
*
|
||||
* @brief M32R Board Support Packages
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup m32r_m32rsim M32R M32RSIM Modules
|
||||
*
|
||||
* @ingroup bsp_m32r
|
||||
*
|
||||
* @brief M32R M32RSIM Modules
|
||||
*/
|
||||
@@ -1,69 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @ingroup m32r_bsp
|
||||
*
|
||||
* @brief m32r definitions in gdb
|
||||
*/
|
||||
|
||||
/* bsp.h
|
||||
*
|
||||
* This include file contains some definitions specific to the
|
||||
* h8 simulator in gdb.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.org/license/LICENSE.
|
||||
*/
|
||||
|
||||
#ifndef LIBBSP_M32R_M32RSIM_BSP_H
|
||||
#define LIBBSP_M32R_M32RSIM_BSP_H
|
||||
|
||||
#include <bspopts.h>
|
||||
#include <bsp/default-initial-extension.h>
|
||||
|
||||
#include <rtems.h>
|
||||
#include <rtems/iosupp.h>
|
||||
#include <rtems/console.h>
|
||||
#include <rtems/clockdrv.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @defgroup m32r_bsp Clock Tick Support
|
||||
*
|
||||
* @ingroup m32r_m32rsim
|
||||
*
|
||||
* @brief Clock Tick Support Package
|
||||
*/
|
||||
|
||||
Thread clock_driver_sim_idle_body(uintptr_t);
|
||||
#define BSP_IDLE_TASK_BODY clock_driver_sim_idle_body
|
||||
|
||||
/* Trap support interface from Newlib 1.16.0 */
|
||||
#define SYS_exit 1
|
||||
#define SYS_open 2
|
||||
#define SYS_close 3
|
||||
#define SYS_read 4
|
||||
#define SYS_write 5
|
||||
#define SYS_lseek 6
|
||||
#define SYS_unlink 7
|
||||
#define SYS_getpid 8
|
||||
#define SYS_kill 9
|
||||
#define SYS_fstat 10
|
||||
|
||||
int __trap0 (int function, int p1, int p2, int p3, struct _reent *r);
|
||||
|
||||
#define TRAP0(f, p1, p2, p3) \
|
||||
__trap0 (f, (int) (p1), (int) (p2), (int) (p3), _REENT)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,42 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @ingroup m32r_tm27
|
||||
*
|
||||
* @brief Time Test 27
|
||||
*/
|
||||
|
||||
/*
|
||||
* tm27.h
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.org/license/LICENSE.
|
||||
*/
|
||||
|
||||
#ifndef _RTEMS_TMTEST27
|
||||
#error "This is an RTEMS internal file you must not include directly."
|
||||
#endif
|
||||
|
||||
#ifndef __tm27_h
|
||||
#define __tm27_h
|
||||
|
||||
/**
|
||||
* @defgroup m32r_tm27 Time Test 27
|
||||
*
|
||||
* @ingroup m32r_m32rsim
|
||||
*
|
||||
* @brief Define the interrupt mechanism for Time Test 27
|
||||
*/
|
||||
|
||||
#define MUST_WAIT_FOR_INTERRUPT 0
|
||||
|
||||
#define Install_tm27_vector( handler ) /* set_vector( (handler), 6, 1 ) */
|
||||
|
||||
#define Cause_tm27_intr() /* XXX */
|
||||
|
||||
#define Clear_tm27_intr() /* XXX */
|
||||
|
||||
#define Lower_tm27_intr() /* empty */
|
||||
|
||||
#endif
|
||||
@@ -1,5 +0,0 @@
|
||||
#
|
||||
# The GDB M32R Simulator does not have a tick interrupt.
|
||||
#
|
||||
|
||||
include: testdata/require-tick-isr.tcfg
|
||||
@@ -1,16 +0,0 @@
|
||||
#
|
||||
# Config file for the M32C GDB Simulator
|
||||
#
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/default.cfg
|
||||
|
||||
RTEMS_CPU=m32r
|
||||
RTEMS_CPU_MODEL=m32r
|
||||
|
||||
# This contains the compiler options necessary to select the CPU model
|
||||
# and (hopefully) optimize for it.
|
||||
CPU_CFLAGS =
|
||||
|
||||
# optimize flag: typically -O2
|
||||
# see GCC PR37665
|
||||
CFLAGS_OPTIMIZE_V = -O2 -g
|
||||
@@ -1,71 +0,0 @@
|
||||
## Automatically generated by ampolish3 - Do not edit
|
||||
|
||||
if AMPOLISH3
|
||||
$(srcdir)/preinstall.am: Makefile.am
|
||||
$(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am
|
||||
endif
|
||||
|
||||
PREINSTALL_DIRS =
|
||||
DISTCLEANFILES += $(PREINSTALL_DIRS)
|
||||
|
||||
all-am: $(PREINSTALL_FILES)
|
||||
|
||||
PREINSTALL_FILES =
|
||||
CLEANFILES = $(PREINSTALL_FILES)
|
||||
|
||||
all-local: $(TMPINSTALL_FILES)
|
||||
|
||||
TMPINSTALL_FILES =
|
||||
CLEANFILES += $(TMPINSTALL_FILES)
|
||||
|
||||
$(PROJECT_LIB)/$(dirstamp):
|
||||
@$(MKDIR_P) $(PROJECT_LIB)
|
||||
@: > $(PROJECT_LIB)/$(dirstamp)
|
||||
PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp)
|
||||
|
||||
$(PROJECT_INCLUDE)/$(dirstamp):
|
||||
@$(MKDIR_P) $(PROJECT_INCLUDE)
|
||||
@: > $(PROJECT_INCLUDE)/$(dirstamp)
|
||||
PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp)
|
||||
|
||||
$(PROJECT_INCLUDE)/bsp/$(dirstamp):
|
||||
@$(MKDIR_P) $(PROJECT_INCLUDE)/bsp
|
||||
@: > $(PROJECT_INCLUDE)/bsp/$(dirstamp)
|
||||
PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/$(dirstamp)
|
||||
|
||||
$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs
|
||||
PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs
|
||||
|
||||
$(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h
|
||||
|
||||
$(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h
|
||||
|
||||
$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h
|
||||
|
||||
$(PROJECT_INCLUDE)/bsp/bootcard.h: ../../shared/include/bootcard.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bootcard.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bootcard.h
|
||||
|
||||
$(PROJECT_INCLUDE)/bsp/console-polled.h: ../../shared/include/console-polled.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/console-polled.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/console-polled.h
|
||||
|
||||
$(PROJECT_INCLUDE)/coverhd.h: ../../shared/include/coverhd.h $(PROJECT_INCLUDE)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/coverhd.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/coverhd.h
|
||||
|
||||
$(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT)
|
||||
TMPINSTALL_FILES += $(PROJECT_LIB)/start.$(OBJEXT)
|
||||
|
||||
$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
|
||||
PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
/*
|
||||
* From Newlib 1.16.0
|
||||
*/
|
||||
|
||||
.text
|
||||
.balign 4
|
||||
.global _start
|
||||
_start:
|
||||
|
||||
seth sp, #shigh(_stack)
|
||||
add3 sp, sp, #low(_stack)
|
||||
ldi fp, #0
|
||||
|
||||
# Clear the BSS. Do it in two parts for efficiency: longwords first
|
||||
# for most of it, then the remaining 0 to 3 bytes.
|
||||
|
||||
seth r2, #shigh(__bss_start)
|
||||
add3 r2, r2, #low(__bss_start); R2 = start of BSS
|
||||
seth r3, #shigh(_end)
|
||||
add3 r3, r3, #low(_end) ; R3 = end of BSS + 1
|
||||
|
||||
sub r3, r2 ; R3 = BSS size in bytes
|
||||
mv r4, r3
|
||||
srli r4, #2 ; R4 = BSS size in longwords (rounded down)
|
||||
ldi r1, #0 ; clear R1 for longword store
|
||||
addi r2, #-4 ; account for pre-inc store
|
||||
beqz r4, .Lendloop1 ; any more to go?
|
||||
.Lloop1:
|
||||
st r1, @+r2 ; yep, zero out another longword
|
||||
addi r4, #-1 ; decrement count
|
||||
bnez r4, .Lloop1 ; go do some more
|
||||
.Lendloop1:
|
||||
and3 r4, r3, #3 ; get no. of remaining BSS bytes to clear
|
||||
addi r2, #4 ; account for pre-inc store
|
||||
beqz r4, .Lendloop2 ; any more to go?
|
||||
.Lloop2:
|
||||
stb r1, @r2 ; yep, zero out another byte
|
||||
addi r2, #1 ; bump address
|
||||
addi r4, #-1 ; decrement count
|
||||
bnez r4, .Lloop2 ; go do some more
|
||||
.Lendloop2:
|
||||
|
||||
# Run code in the .init section.
|
||||
# This will queue the .fini section to be run with atexit.
|
||||
|
||||
# bl __init
|
||||
|
||||
# Call main, then exit.
|
||||
|
||||
ldi r1, #0 ; r1 = argv
|
||||
ldi r0, #0 ; r0 = argc
|
||||
bl boot_card
|
||||
|
||||
# If that fails just loop.
|
||||
|
||||
.Lexit:
|
||||
bra .Lexit
|
||||
@@ -1,17 +0,0 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2011.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.org/license/LICENSE.
|
||||
*/
|
||||
|
||||
#include <rtems.h>
|
||||
#include <bsp/bootcard.h>
|
||||
#include <bsp.h>
|
||||
|
||||
void bsp_reset( void )
|
||||
{
|
||||
TRAP0(SYS_exit, 0, 0, 0);
|
||||
}
|
||||
@@ -1,253 +0,0 @@
|
||||
/*
|
||||
* Declare some sizes.
|
||||
*/
|
||||
RamBase = DEFINED(RamBase) ? RamBase : 0x000000;
|
||||
RamSize = DEFINED(RamSize) ? RamSize : 0x800000;
|
||||
HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
|
||||
StackSize = DEFINED(StackSize) ? StackSize : 0x1000;
|
||||
|
||||
|
||||
/* Default linker script, for normal executables */
|
||||
OUTPUT_FORMAT("elf32-m32r", "elf32-m32r",
|
||||
"elf32-m32r")
|
||||
OUTPUT_ARCH(m32r)
|
||||
ENTRY(_start)
|
||||
SEARCH_DIR("/home/joel/work-gnat/svn/m32r-install/m32r-elf/lib");
|
||||
SECTIONS
|
||||
{
|
||||
/* Read-only sections, merged into text segment: */
|
||||
PROVIDE (__executable_start = 0x100); . = 0x100;
|
||||
.interp : { *(.interp) }
|
||||
.note.gnu.build-id : { *(.note.gnu.build-id) }
|
||||
.hash : { *(.hash) }
|
||||
.gnu.hash : { *(.gnu.hash) }
|
||||
.dynsym : { *(.dynsym) }
|
||||
.dynstr : { *(.dynstr) }
|
||||
.gnu.version : { *(.gnu.version) }
|
||||
.gnu.version_d : { *(.gnu.version_d) }
|
||||
.gnu.version_r : { *(.gnu.version_r) }
|
||||
.rel.init : { *(.rel.init) }
|
||||
.rela.init : { *(.rela.init) }
|
||||
.rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) }
|
||||
.rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
|
||||
.rel.fini : { *(.rel.fini) }
|
||||
.rela.fini : { *(.rela.fini) }
|
||||
.rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
|
||||
.rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
|
||||
.rel.data.rel.ro : { *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*) }
|
||||
.rela.data.rel.ro : { *(.rela.data.rel.ro* .rela.gnu.linkonce.d.rel.ro.*) }
|
||||
.rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
|
||||
.rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
|
||||
.rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
|
||||
.rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
|
||||
.rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
|
||||
.rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
|
||||
.rel.ctors : { *(.rel.ctors) }
|
||||
.rela.ctors : { *(.rela.ctors) }
|
||||
.rel.dtors : { *(.rel.dtors) }
|
||||
.rela.dtors : { *(.rela.dtors) }
|
||||
.rel.got : { *(.rel.got) }
|
||||
.rela.got : { *(.rela.got) }
|
||||
.rel.sdata : { *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) }
|
||||
.rela.sdata : { *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) }
|
||||
.rel.sbss : { *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) }
|
||||
.rela.sbss : { *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) }
|
||||
.rel.sdata2 : { *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) }
|
||||
.rela.sdata2 : { *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) }
|
||||
.rel.sbss2 : { *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) }
|
||||
.rela.sbss2 : { *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) }
|
||||
.rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
|
||||
.rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
|
||||
.rel.plt : { *(.rel.plt) }
|
||||
.rela.plt : { *(.rela.plt) }
|
||||
.init :
|
||||
{
|
||||
KEEP (*(.init))
|
||||
} =0
|
||||
.plt : { *(.plt) }
|
||||
.text :
|
||||
{
|
||||
*(.text .stub .text.* .gnu.linkonce.t.*)
|
||||
/* .gnu.warning sections are handled specially by elf32.em. */
|
||||
*(.gnu.warning)
|
||||
} =0
|
||||
.fini :
|
||||
{
|
||||
KEEP (*(.fini))
|
||||
} =0
|
||||
PROVIDE (__etext = .);
|
||||
PROVIDE (_etext = .);
|
||||
PROVIDE (etext = .);
|
||||
.rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) KEEP (*(SORT(.rtemsroset.*))) }
|
||||
.rodata1 : { *(.rodata1) }
|
||||
.tdata : {
|
||||
_TLS_Data_begin = .;
|
||||
*(.tdata .tdata.* .gnu.linkonce.td.*)
|
||||
_TLS_Data_end = .;
|
||||
}
|
||||
.tbss : {
|
||||
_TLS_BSS_begin = .;
|
||||
*(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
|
||||
_TLS_BSS_end = .;
|
||||
}
|
||||
_TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
|
||||
_TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
|
||||
_TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
|
||||
_TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
|
||||
_TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
|
||||
_TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
|
||||
.sdata2 :
|
||||
{
|
||||
*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
|
||||
}
|
||||
.sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) }
|
||||
.eh_frame_hdr : { *(.eh_frame_hdr) }
|
||||
.eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
|
||||
.gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
|
||||
/* Adjust the address for the data segment. We want to adjust up to
|
||||
the same address within the page on the next page up. */
|
||||
. = ALIGN(32) + (. & (32 - 1));
|
||||
/* Exception handling */
|
||||
.eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) }
|
||||
.gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
|
||||
/* Thread Local Storage sections */
|
||||
.tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
|
||||
.tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
|
||||
.preinit_array :
|
||||
{
|
||||
PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||
KEEP (*(.preinit_array))
|
||||
PROVIDE_HIDDEN (__preinit_array_end = .);
|
||||
}
|
||||
.init_array :
|
||||
{
|
||||
PROVIDE_HIDDEN (__init_array_start = .);
|
||||
KEEP (*(SORT(.init_array.*)))
|
||||
KEEP (*(.init_array))
|
||||
PROVIDE_HIDDEN (__init_array_end = .);
|
||||
}
|
||||
.fini_array :
|
||||
{
|
||||
PROVIDE_HIDDEN (__fini_array_start = .);
|
||||
KEEP (*(.fini_array))
|
||||
KEEP (*(SORT(.fini_array.*)))
|
||||
PROVIDE_HIDDEN (__fini_array_end = .);
|
||||
}
|
||||
.ctors :
|
||||
{
|
||||
/* gcc uses crtbegin.o to find the start of
|
||||
the constructors, so we make sure it is
|
||||
first. Because this is a wildcard, it
|
||||
doesn't matter if the user does not
|
||||
actually link against crtbegin.o; the
|
||||
linker won't look for a file to match a
|
||||
wildcard. The wildcard also means that it
|
||||
doesn't matter which directory crtbegin.o
|
||||
is in. */
|
||||
KEEP (*crtbegin.o(.ctors))
|
||||
KEEP (*crtbegin?.o(.ctors))
|
||||
/* We don't want to include the .ctor section from
|
||||
the crtend.o file until after the sorted ctors.
|
||||
The .ctor section from the crtend file contains the
|
||||
end of ctors marker and it must be last */
|
||||
KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
|
||||
KEEP (*(SORT(.ctors.*)))
|
||||
KEEP (*(.ctors))
|
||||
}
|
||||
.dtors :
|
||||
{
|
||||
KEEP (*crtbegin.o(.dtors))
|
||||
KEEP (*crtbegin?.o(.dtors))
|
||||
KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
|
||||
KEEP (*(SORT(.dtors.*)))
|
||||
KEEP (*(.dtors))
|
||||
}
|
||||
.jcr : { KEEP (*(.jcr)) }
|
||||
.data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
|
||||
.dynamic : { *(.dynamic) }
|
||||
.data :
|
||||
{
|
||||
*(.data .data.* .gnu.linkonce.d.*)
|
||||
KEEP (*(SORT(.rtemsrwset.*)))
|
||||
SORT(CONSTRUCTORS)
|
||||
}
|
||||
.data1 : { *(.data1) }
|
||||
.got : { *(.got.plt) *(.got) }
|
||||
/* We want the small data sections together, so single-instruction offsets
|
||||
can access them all, and initialized data all before uninitialized, so
|
||||
we can shorten the on-disk segment size. */
|
||||
.sdata :
|
||||
{
|
||||
*(.sdata .sdata.* .gnu.linkonce.s.*)
|
||||
}
|
||||
_edata = .; PROVIDE (edata = .);
|
||||
__bss_start = .;
|
||||
.sbss :
|
||||
{
|
||||
*(.dynsbss)
|
||||
*(.sbss .sbss.* .gnu.linkonce.sb.*)
|
||||
*(.scommon)
|
||||
}
|
||||
.bss :
|
||||
{
|
||||
*(.dynbss)
|
||||
*(.bss .bss.* .gnu.linkonce.b.*)
|
||||
*(COMMON)
|
||||
/* Align here to ensure that the .bss section occupies space up to
|
||||
_end. Align after .bss to ensure correct alignment even if the
|
||||
.bss section disappears because there are no input sections.
|
||||
FIXME: Why do we need it? When there is no .bss section, we don't
|
||||
pad the .data section. */
|
||||
. = ALIGN(. != 0 ? 32 / 8 : 1);
|
||||
}
|
||||
. = ALIGN(32 / 8);
|
||||
. = ALIGN(32 / 8);
|
||||
_end = .; PROVIDE (end = .);
|
||||
. = ALIGN(16);
|
||||
|
||||
. += StackSize;
|
||||
PROVIDE (_stack = .);
|
||||
PROVIDE (WorkAreaBase = .);
|
||||
. = 0x800000;
|
||||
/* 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) }
|
||||
.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) }
|
||||
/* DWARF 3 */
|
||||
.debug_pubtypes 0 : { *(.debug_pubtypes) }
|
||||
.debug_ranges 0 : { *(.debug_ranges) }
|
||||
/* DWARF extension */
|
||||
.debug_macro 0 : { *(.debug_macro) }
|
||||
.gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
|
||||
/* PROVIDE (_stack = 0x800000); */
|
||||
/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) }
|
||||
}
|
||||
Reference in New Issue
Block a user