jerpelea opened a new pull request, #19155:
URL: https://github.com/apache/nuttx/pull/19155
## Summary
Correct build errors when CONFIG_ENABLE_ALL_SIGNALS is not defined
The current master doesn't compile for CONFIG_BUILD_PROTECTED with the
following setup:
#
# Signal Configuration
#
# CONFIG_ENABLE_ALL_SIGNALS is not set
CONFIG_ENABLE_PARTIAL_SIGNALS=y
# CONFIG_DISABLE_ALL_SIGNALS is not set
The first errors occur from the svcall:
In file included from armv7-m/arm_svcall.c:32:
armv7-m/arm_svcall.c: In function 'arm_svcall':
armv7-m/arm_svcall.c:250:32: error: 'struct xcptcontext' has no member named
'sigreturn'
250 | DEBUGASSERT(rtcb->xcp.sigreturn == 0);
| ^
armv7-m/arm_svcall.c:251:20: error: 'struct xcptcontext' has no member named
'sigreturn'
251 | rtcb->xcp.sigreturn = regs[REG_PC];
| ^
armv7-m/arm_svcall.c:257:53: error: 'struct userspace_s' has no member named
'signal_handler'
257 | regs[REG_PC] = (uint32_t)USERSPACE->signal_handler
& ~1;
| ^~
armv7-m/arm_svcall.c:292:32: error: 'struct xcptcontext' has no member named
'sigreturn'
292 | DEBUGASSERT(rtcb->xcp.sigreturn != 0);
| ^
armv7-m/arm_svcall.c:294:43: error: 'struct xcptcontext' has no member named
'sigreturn'
294 | regs[REG_PC] = rtcb->xcp.sigreturn & ~1;
| ^
armv7-m/arm_svcall.c:300:20: error: 'struct xcptcontext' has no member named
'sigreturn'
300 | rtcb->xcp.sigreturn = 0;
| ^
make[1]: *** [Makefile:179: arm_svcall.o] Error 1
Fixing that, leads to linker errors with undefined symbols with
"nxsig_unmask_pendingsignal" etc.
There are reasons why it compiles for CONFIG_BUILD_FLAT (partially by luck,
perhaps partially by design):
Some of the offending code is behind CONFIG_LIB_SYSCALL, which is
defined only in memory protected builds
Some of the offending code is behind CONFIG_BUILD_PROTECTED in signal
handler
When the nuttx is compiled first into archives and later linked
together, the call to nxsig_unmask_pendingsignal is only pulled in in case user
calls ppoll, pselect, sigsuspend or such from the code (signal.o is not used in
linking)
The two commits in this PR fix the compilation, and also correct the
functionality in CONFIG_ENABLE_PARTIAL_SIGNALS. With that flag, signal actions
are now disabled, but simple signal delivery and wakeup works.
## Impact
RELEASE
## Testing
CI
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]