C++ constructors work with ELF load now

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5273 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2012-10-29 19:32:05 +00:00
parent 87c59956d8
commit ce5a117334
3 changed files with 11 additions and 9 deletions

View File

@ -160,8 +160,8 @@ LDNXFLATFLAGS = -e main -s 2048
# ELF module definitions
CELFFLAGS = $(CFLAGS) -mlong-calls
CXXELFFLAGS = $(CXXFLAGS) -mlong-calls
CELFFLAGS = $(CFLAGS) -mlong-calls # --target1-abs
CXXELFFLAGS = $(CXXFLAGS) -mlong-calls # --target1-abs
LDELFFLAGS = -r -e main
ifeq ($(WINTOOL),y)

View File

@ -388,7 +388,7 @@ CONFIG_ELF_ALIGN_LOG2=2
CONFIG_ELF_STACKSIZE=2048
CONFIG_ELF_BUFFERSIZE=128
CONFIG_ELF_BUFFERINCR=32
CONFIG_ELF_CONSTRUCTORS=y
CONFIG_BINFMT_CONSTRUCTORS=y
CONFIG_SYMTAB_ORDEREDBYNAME=y
#

View File

@ -51,8 +51,8 @@ SECTIONS
*/
*(.gnu.linkonce.t.*)
*(.init)
*(.fini)
*(.init) /* Old ABI */
*(.fini) /* Old ABI */
_etext = . ;
}
@ -86,15 +86,17 @@ SECTIONS
.ctors :
{
_sctros = . ;
*(.ctors)
_sctors = . ;
*(.ctors) /* Old ABI: Unallocated */
*(.init_array) /* New ABI: Allocated */
_edtors = . ;
}
.ctors :
.dtors :
{
_sdtors = . ;
*(.dtors)
*(.dtors) /* Old ABI: Unallocated */
*(.fini_array) /* New ABI: Allocated */
_edtors = . ;
}