From f86ec4236f27434b93f3a0d902ee34bdde963630 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 17 Feb 1998 23:35:54 +0000 Subject: Added .eh_frame, C++ constructor, and C++ destructor sections. --- c/src/lib/libbsp/i386/force386/startup/linkcmds | 20 +++++++++++++++++++- c/src/lib/libbsp/i386/i386ex/startup/linkcmds | 18 ++++++++++++++++++ c/src/lib/libbsp/i386/pc386/startup/linkcmds | 18 ++++++++++++++++++ 3 files changed, 55 insertions(+), 1 deletion(-) (limited to 'c/src/lib/libbsp/i386') diff --git a/c/src/lib/libbsp/i386/force386/startup/linkcmds b/c/src/lib/libbsp/i386/force386/startup/linkcmds index 53a02ae699..1c15fe1cb8 100644 --- a/c/src/lib/libbsp/i386/force386/startup/linkcmds +++ b/c/src/lib/libbsp/i386/force386/startup/linkcmds @@ -24,7 +24,25 @@ SECTIONS { _text_start = . ; *(.text) - _etext = ALIGN( 0x10 ) ; + . = ALIGN (16); + + *(.eh_fram) + . = ALIGN (16); + + /* + * C++ constructors + */ + __CTOR_LIST__ = .; + LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) + *(.ctors) + LONG(0) + __CTOR_END__ = .; + __DTOR_LIST__ = .; + LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2) + *(.dtors) + LONG(0) + __DTOR_END__ = .; + _etext = ALIGN( 0x10 ) ; } .data ADDR( .text ) + SIZEOF( .text ): { diff --git a/c/src/lib/libbsp/i386/i386ex/startup/linkcmds b/c/src/lib/libbsp/i386/i386ex/startup/linkcmds index fa7cf47a60..927ffe92a2 100644 --- a/c/src/lib/libbsp/i386/i386ex/startup/linkcmds +++ b/c/src/lib/libbsp/i386/i386ex/startup/linkcmds @@ -88,6 +88,24 @@ SECTIONS { _text_start = . ; *(.text ) ; + . = ALIGN (16); + + *(.eh_fram) + . = ALIGN (16); + + /* + * C++ constructors + */ + __CTOR_LIST__ = .; + LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) + *(.ctors) + LONG(0) + __CTOR_END__ = .; + __DTOR_LIST__ = .; + LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2) + *(.dtors) + LONG(0) + __DTOR_END__ = .; _etext = ALIGN( 0x10 ); } diff --git a/c/src/lib/libbsp/i386/pc386/startup/linkcmds b/c/src/lib/libbsp/i386/pc386/startup/linkcmds index 339195da1b..038531fc79 100644 --- a/c/src/lib/libbsp/i386/pc386/startup/linkcmds +++ b/c/src/lib/libbsp/i386/pc386/startup/linkcmds @@ -39,6 +39,24 @@ SECTIONS { _text_start = . ; *(.text) + . = ALIGN (16); + + *(.eh_fram) + . = ALIGN (16); + + /* + * C++ constructors + */ + __CTOR_LIST__ = .; + LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) + *(.ctors) + LONG(0) + __CTOR_END__ = .; + __DTOR_LIST__ = .; + LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2) + *(.dtors) + LONG(0) + __DTOR_END__ = .; _etext = ALIGN( 0x10 ) ; } .rodata ADDR( .text ) + SIZEOF( .text ): -- cgit v1.2.3