nealef commented on PR #2026:
URL: https://github.com/apache/nuttx-apps/pull/2026#issuecomment-2150779527
@tmedicci When I build the dyntest `.so` file I use a variable
`$(SHMODULEFLAGS)`. I think this needs updating for the platform to include the
`--entry=__start` option. Here's the `dynload/Makefile` section of interest:
```
$(OBJS): %$(OBJEXT): %.c
@echo "MODULECC: $<"
$(Q) $(MODULECC) -c $(CMODULEFLAGS) $(SHCCFLAGS) $< -o $@
$(BIN): $(OBJS)
@echo "MODULELD: $<"
$(Q) $(MODULELD) $(SHMODULEFLAGS) $(LDLIBPATH) -o $@ $^ $(LDLIBS)
```
Here's where we set it for riscv:
```
--- a/arch/risc-v/src/common/Toolchain.defs
+++ b/arch/risc-v/src/common/Toolchain.defs
@@ -104,8 +104,11 @@ ifneq ($(CONFIG_CXX_RTTI),y)
ARCHCXXFLAGS += -fno-rtti
endif
+SHMODULEFLAGS = -Bsymbolic -G -Bdynamic
+
ifeq ($(CONFIG_ARCH_RV32),y)
LDFLAGS += -melf32lriscv
+SHMODULEFLAGS += -melf32lriscv
else
LDFLAGS += -melf64lriscv
endif
```
--
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]