1
0
Fork 0
forked from nuttx/nuttx-update

sim/syscall: add syscall note support in the flat build

Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an 2022-03-07 20:08:12 +08:00 committed by Xiang Xiao
parent 1e7e1cad0b
commit a14ed02571
3 changed files with 12 additions and 1 deletions

View file

@ -77,6 +77,7 @@ config ARCH_SIM
select ARCH_HAVE_MULTICPU
select ARCH_HAVE_RTC_SUBSECONDS
select ARCH_HAVE_SERIAL_TERMIOS
select ARCH_HAVE_SYSCALL_HOOKS
select ARCH_HAVE_TICKLESS
select ARCH_HAVE_POWEROFF
select ARCH_HAVE_TESTSET

View file

@ -33,6 +33,8 @@
* Pre-processor Definitions
****************************************************************************/
#define CONFIG_SYS_RESERVED 0
/****************************************************************************
* Public Types
****************************************************************************/

View file

@ -227,6 +227,13 @@ ifneq ($(CONFIG_HOST_MACOS),y)
LDSTARTGROUP ?= --start-group
LDENDGROUP ?= --end-group
endif
# Additional rules for system call wrapper
ifeq ($(CONFIG_SCHED_INSTRUMENTATION_SYSCALL),y)
EXTRALINKCMDS += @$(TOPDIR)/syscall/syscall_wraps.ldcmd
endif
LDFLAGS += $(addprefix -T,$(call CONVERT_PATH,$(ARCHSCRIPT)))
# Determine which NuttX libraries will need to be linked in
@ -293,7 +300,8 @@ nuttx-names.dat: nuttx-names.in
# necessary for macOS.
nuttx$(EXEEXT): libarch$(LIBEXT) board/libboard$(LIBEXT) $(HEADOBJ) $(LINKOBJS) $(HOSTOBJS) nuttx-names.dat
$(Q) echo "LD: nuttx$(EXEEXT)"
$(Q) $(LD) -r $(LDLINKFLAGS) $(RELPATHS) $(EXTRA_LIBPATHS) -o nuttx.rel $(REQUIREDOBJS) $(LDSTARTGROUP) $(RELLIBS) $(EXTRA_LIBS) $(LDENDGROUP)
$(Q) $(LD) -r $(LDLINKFLAGS) $(RELPATHS) $(EXTRA_LIBPATHS) $(EXTRALINKCMDS) \
-o nuttx.rel $(REQUIREDOBJS) $(LDSTARTGROUP) $(RELLIBS) $(EXTRA_LIBS) $(LDENDGROUP)
ifneq ($(CONFIG_HOST_MACOS),y)
$(Q) $(OBJCOPY) --redefine-syms=nuttx-names.dat nuttx.rel
$(Q) $(CC) $(CFLAGS) -Wl,-verbose 2>&1 | \