Syscall instrumentation build system support for Arm and RISC-V
This commit is contained in:
parent
376786288e
commit
02718f0827
|
@ -14,6 +14,7 @@ config ARCH_ARM
|
|||
select ARCH_HAVE_STACKCHECK
|
||||
select ARCH_HAVE_CUSTOMOPT
|
||||
select ARCH_HAVE_STDARG_H
|
||||
select ARCH_HAVE_SYSCALL_HOOKS
|
||||
---help---
|
||||
The ARM architectures
|
||||
|
||||
|
@ -60,6 +61,7 @@ config ARCH_RISCV
|
|||
select ARCH_HAVE_STACKCHECK
|
||||
select ARCH_HAVE_CUSTOMOPT
|
||||
select ARCH_HAVE_STDARG_H
|
||||
select ARCH_HAVE_SYSCALL_HOOKS
|
||||
---help---
|
||||
RISC-V 32 and 64-bit RV32 / RV64 architectures.
|
||||
|
||||
|
|
|
@ -69,6 +69,12 @@ else
|
|||
NUTTX = "$(TOPDIR)$(DELIM)nuttx$(EXEEXT)"
|
||||
endif
|
||||
|
||||
# Additional rules for system call wrapper
|
||||
|
||||
ifeq ($(CONFIG_SCHED_INSTRUMENTATION_SYSCALL),y)
|
||||
EXTRALINKCMDS += @$(TOPDIR)/syscall/syscall_wraps.ldcmd
|
||||
endif
|
||||
|
||||
# The "head" object
|
||||
|
||||
HEAD_OBJ = $(HEAD_ASRC:.S=$(OBJEXT))
|
||||
|
@ -99,7 +105,7 @@ UOBJS = $(UAOBJS) $(UCOBJS)
|
|||
KBIN = libkarch$(LIBEXT)
|
||||
BIN = libarch$(LIBEXT)
|
||||
|
||||
LDFLAGS += $(ARCHSCRIPT)
|
||||
LDFLAGS += $(ARCHSCRIPT) $(EXTRALINKCMDS)
|
||||
|
||||
# Override in Make.defs if linker is not 'ld'
|
||||
|
||||
|
|
|
@ -66,6 +66,12 @@ else
|
|||
NUTTX = "$(TOPDIR)$(DELIM)nuttx$(EXEEXT)"
|
||||
endif
|
||||
|
||||
# Additional rules for system call wrapper
|
||||
|
||||
ifeq ($(CONFIG_SCHED_INSTRUMENTATION_SYSCALL),y)
|
||||
EXTRALINKCMDS += @$(TOPDIR)/syscall/syscall_wraps.ldcmd
|
||||
endif
|
||||
|
||||
# The "head" object
|
||||
|
||||
HEAD_OBJ = $(HEAD_ASRC:.S=$(OBJEXT))
|
||||
|
@ -96,7 +102,7 @@ UOBJS = $(UAOBJS) $(UCOBJS)
|
|||
KBIN = libkarch$(LIBEXT)
|
||||
BIN = libarch$(LIBEXT)
|
||||
|
||||
LDFLAGS += $(ARCHSCRIPT)
|
||||
LDFLAGS += $(ARCHSCRIPT) $(EXTRALINKCMDS)
|
||||
|
||||
LDSTARTGROUP ?= --start-group
|
||||
LDENDGROUP ?= --end-group
|
||||
|
|
|
@ -975,7 +975,7 @@ config SCHED_INSTRUMENTATION_SPINLOCKS
|
|||
config SCHED_INSTRUMENTATION_SYSCALL
|
||||
bool "System call monitor hooks"
|
||||
default n
|
||||
depends on LIB_SYSCALL && ARCH_HAVE_SYSCALL_HOOKS
|
||||
depends on ARCH_HAVE_SYSCALL_HOOKS
|
||||
---help---
|
||||
Enables additional hooks for entry and exit from system call.
|
||||
Board-specific logic must provide this additional logic.
|
||||
|
|
Loading…
Reference in New Issue