This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 57e761f72 build: Omit default priority ELF symbol.
57e761f72 is described below
commit 57e761f7242254e0a15d498972d87704c709b07e
Author: Marco Casaroli <[email protected]>
AuthorDate: Sun Jul 26 17:00:11 2026 +0200
build: Omit default priority ELF symbol.
Do not define nx_priority for applications that use SCHED_PRIORITY_DEFAULT.
The ELF loader already uses its scheduler default when the symbol is absent,
avoiding the invalid priority-zero value previously encoded by Application.mk.
Keep emitting nx_priority, and retaining it through stripping, for explicit
numeric priorities.
Assisted-by: Zed:GPT-5.6 Terra
Signed-off-by: Marco Casaroli <[email protected]>
---
Application.mk | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/Application.mk b/Application.mk
index d950f698c..bc83121a9 100644
--- a/Application.mk
+++ b/Application.mk
@@ -146,10 +146,9 @@ ifneq ($(strip $(PROGNAME)),)
# CONFIG_SCHED_USER_IDENTITY) so the binary loader can recover them.
# Per-target so each PROGLIST entry picks up its own STACKSIZE_/PRIORITY_.
- $(PROGLIST): SYM_PRIORITY = $(if $(filter
SCHED_PRIORITY_DEFAULT,$(PRIORITY_$@)),0,$(PRIORITY_$@))
$(PROGLIST): MODLDFLAGS += \
$(if $(STACKSIZE_$@),--defsym nx_stacksize=$(STACKSIZE_$@)) \
- $(if $(PRIORITY_$@),--defsym nx_priority=$(SYM_PRIORITY))
+ $(if $(filter-out SCHED_PRIORITY_DEFAULT,$(PRIORITY_$@)),--defsym
nx_priority=$(PRIORITY_$@))
ifeq ($(CONFIG_SCHED_USER_IDENTITY),y)
$(PROGLIST): MODLDFLAGS += \
$(if $(UID_$@),--defsym nx_uid=$(UID_$@)) \
@@ -159,7 +158,7 @@ endif
# Keep the attribute symbols through --strip-unneeded so the binary loader
# can still read them from the stripped runtime image in bin/.
- $(PROGLIST): NX_KEEP = $(if $(STACKSIZE_$@),-K nx_stacksize) $(if
$(PRIORITY_$@),-K nx_priority) $(if $(UID_$@),-K nx_uid) $(if $(GID_$@),-K
nx_gid) $(if $(MODE_$@),-K nx_mode)
+ $(PROGLIST): NX_KEEP = $(if $(STACKSIZE_$@),-K nx_stacksize) $(if
$(filter-out SCHED_PRIORITY_DEFAULT,$(PRIORITY_$@)),-K nx_priority) $(if
$(UID_$@),-K nx_uid) $(if $(GID_$@),-K nx_gid) $(if $(MODE_$@),-K nx_mode)
endif
# Condition flags