summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/i386/ts_386ex/startup
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-08-11 23:45:57 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-08-11 23:45:57 +0000
commit1d4048b236f1ca4ee555de04ca1b8d1492434670 (patch)
tree19ba7b2e04b8576d685a274a04cc720e56e6adfc /c/src/lib/libbsp/i386/ts_386ex/startup
parentFinal update from Santanu Mitra <smitra@cs.uah.edu>, T.N.S. Prasad (diff)
downloadrtems-1d4048b236f1ca4ee555de04ca1b8d1492434670.tar.bz2
Patch from Tony R. Ambardar <tonya@ece.ubc.ca>:
I'm attaching a big patch for the ts_386ex BSP which adds and includes the following: 1) Conversion to ELF format + minor code cleanups + documentation. 2) An Ada95 binding to FreeBSD sockets, based on Samuel Tardieu's adasockets-0.1.3 package. This includes some sample applications. 3) Some Ada and C interfaces to add serial-port debugging to programs. Comes with examples, too; the Ada one shows how transparent adding the support can be. Note that Rosimildo sent me the original C code. The network stuff is not BSP specific, and could be added to your Ada code collection. The debugging stuff is specific to the i386. Right now, everything sits in my "tools" directory.
Diffstat (limited to 'c/src/lib/libbsp/i386/ts_386ex/startup')
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/startup/Makefile.in2
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/startup/bspstart.c1
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/startup/linkcmds74
3 files changed, 58 insertions, 19 deletions
diff --git a/c/src/lib/libbsp/i386/ts_386ex/startup/Makefile.in b/c/src/lib/libbsp/i386/ts_386ex/startup/Makefile.in
index e3aec0984f..92699fa3ec 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/startup/Makefile.in
+++ b/c/src/lib/libbsp/i386/ts_386ex/startup/Makefile.in
@@ -51,7 +51,7 @@ $(INSTALLDIRS):
#DEFINES += -DPRINTON
-DEFINES += -I$(srcdir)
+DEFINES += -DUSE_INIT_FINI
CPPFLAGS +=
CFLAGS +=
diff --git a/c/src/lib/libbsp/i386/ts_386ex/startup/bspstart.c b/c/src/lib/libbsp/i386/ts_386ex/startup/bspstart.c
index c0e92617e8..0d878fcc45 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/startup/bspstart.c
+++ b/c/src/lib/libbsp/i386/ts_386ex/startup/bspstart.c
@@ -78,7 +78,6 @@ void bsp_pretasking_hook(void)
heap_size = BSP_Configuration.work_space_start -(void *) heap_start ;
heap_size &= 0xfffffff0; /* keep it as a multiple of 16 bytes */
- heap_size &= 0xfffffff0; /* keep it as a multiple of 16 bytes */
bsp_libc_init((void *) heap_start, heap_size, 0);
diff --git a/c/src/lib/libbsp/i386/ts_386ex/startup/linkcmds b/c/src/lib/libbsp/i386/ts_386ex/startup/linkcmds
index 99911126bb..6710fe92e7 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/startup/linkcmds
+++ b/c/src/lib/libbsp/i386/ts_386ex/startup/linkcmds
@@ -21,45 +21,49 @@
*/
ENTRY(_init_i386ex) ;
+
SECTIONS
{
/***************************************************************************
* initial section:
*
- * This section is the first in memory, preceding the text and data sections.
- * It initializes the i386ex, sets up the gdt in RAM, loads the gdt,
+ * This subsection of ".text" is the first in memory, and executed by the DOS
+ * loader. It initializes the i386ex, sets up the gdt in RAM, loads the gdt,
* jumps to protected mode, loads the idt, zeros the bss section, sets up
* the stack and calls the rest of the RTEMS initialization.
***************************************************************************/
_DOS_ld_addr = 0x0008000 ;
- .initial _DOS_ld_addr :
- {
- *(.initial);
- }
-
/***************************************************************************
* text section:
*
* Nobody here but us opcodes.
***************************************************************************/
- .text BLOCK(0x10) :
+ .text _DOS_ld_addr :
{
- CREATE_OBJECT_SYMBOLS
+ CREATE_OBJECT_SYMBOLS
text_start = . ;
_text_start = . ;
- *(.text ) ;
- . = ALIGN (16);
- *(.eh_fram)
- . = ALIGN (16);
+ *(.initial);
+ . = ALIGN(0x20);
+
+ *(.text );
+ . = ALIGN (0x20);
+
+ *(.eh_frame)
+ . = ALIGN (0x20);
+
+ *(.gnu.linkonce.t*)
+ . = ALIGN(0x20);
/*
* C++ constructors
*/
+
__CTOR_LIST__ = .;
LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
*(.ctors)
@@ -71,24 +75,48 @@ SECTIONS
*(.dtors)
LONG(0)
__DTOR_END__ = .;
+
_rodata_start = . ;
*(.rodata)
+ . = ALIGN(0x20);
+ _erodata = .;
+
*(.gnu.linkonce.r*)
- _erodata = ALIGN( 0x10 ) ;
- _etext = ALIGN( 0x10 );
+ . = ALIGN(0x20);
_endtext = . ;
}
/***************************************************************************
+ * ctor/dtor sections:
+ *
+ * These sections house the global constructors and destructors.
+ ***************************************************************************/
+
+ .init BLOCK(0x20) :
+ {
+ *(.init)
+ } = 0x9090
+
+ .fini BLOCK(0x20) :
+ {
+ *(.fini)
+ } = 0x9090
+
+/***************************************************************************
* data section:
*
* This section defines the location of the data section in RAM.
***************************************************************************/
- .data BLOCK(0x10) :
+ .data BLOCK(0x20) :
{
_sdata = .;
*(.data);
+ . = ALIGN(0x20);
+ *(.gnu.linkonce.d*)
+ . = ALIGN(0x20);
+ *(.gcc_except_table)
+ . = ALIGN(0x20);
_edata = .;
}
_data_size = _edata - _sdata ;
@@ -104,11 +132,23 @@ SECTIONS
_bss_start = .;
*(.bss);
*(COMMON);
- _ebss = ALIGN(0x10);
+ _ebss = ALIGN(0x20);
}
_bss_size = _ebss - _bss_start ;
/***************************************************************************
+ * discard section:
+ *
+ * This section is used to throw away stuff we don't want.
+ ***************************************************************************/
+
+ /DISCARD/ :
+ {
+ *(.comment);
+ *(.note);
+ }
+
+/***************************************************************************
* General variables:
*
* The stack_size variable is customizable here. The heap is located directly