bsp,abstract-machine: fix the order of .rti_fn* sections
* now initcall can work successfully, and msh can show prompt
This commit is contained in:
parent
fed1897b98
commit
624077b98c
4 changed files with 32 additions and 0 deletions
|
@ -6,6 +6,7 @@ RTCONFIG_H = rtconfig.h
|
||||||
NAME = rtthread
|
NAME = rtthread
|
||||||
SRCS = $(shell find src -name "*.c")
|
SRCS = $(shell find src -name "*.c")
|
||||||
CFLAGS += -DHAVE_CCONFIG_H -D__RTTHREAD__
|
CFLAGS += -DHAVE_CCONFIG_H -D__RTTHREAD__
|
||||||
|
LDFLAGS += extra.ld
|
||||||
-include $(FILE_MK)
|
-include $(FILE_MK)
|
||||||
include $(AM_HOME)/Makefile
|
include $(AM_HOME)/Makefile
|
||||||
|
|
||||||
|
|
19
bsp/abstract-machine/extra.ld
Normal file
19
bsp/abstract-machine/extra.ld
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
SECTIONS {
|
||||||
|
. = ALIGN(8);
|
||||||
|
|
||||||
|
.myextra : {
|
||||||
|
/* section information for initial. */
|
||||||
|
. = ALIGN(8);
|
||||||
|
__rt_init_start = .;
|
||||||
|
KEEP(*(SORT(.rti_fn*)))
|
||||||
|
__rt_init_end = .;
|
||||||
|
. = ALIGN(8);
|
||||||
|
|
||||||
|
__rt_utest_tc_tab_start = .;
|
||||||
|
KEEP(*(UtestTcTab))
|
||||||
|
__rt_utest_tc_tab_end = .;
|
||||||
|
}
|
||||||
|
end = .;
|
||||||
|
_end = .;
|
||||||
|
_heap_start = ALIGN(0x1000);
|
||||||
|
}
|
|
@ -1,6 +1,9 @@
|
||||||
#include <am.h>
|
#include <am.h>
|
||||||
#include <rtthread.h>
|
#include <rtthread.h>
|
||||||
|
|
||||||
|
void *__fsymtab_start = NULL;
|
||||||
|
void *__fsymtab_end = NULL;
|
||||||
|
|
||||||
#define RT_HW_HEAP_BEGIN heap.start
|
#define RT_HW_HEAP_BEGIN heap.start
|
||||||
#define RT_HW_HEAP_END heap.end
|
#define RT_HW_HEAP_END heap.end
|
||||||
|
|
||||||
|
|
9
bsp/abstract-machine/src/libc.c
Normal file
9
bsp/abstract-machine/src/libc.c
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
#include <klib.h>
|
||||||
|
|
||||||
|
char *strchr(const char *s, int c) {
|
||||||
|
assert(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
char *strstr(const char *haystack, const char *needle) {
|
||||||
|
assert(0);
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue