You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/02/13 19:02:58 UTC

[GitHub] [incubator-nuttx] yamt commented on a change in pull request #272: Sim: loadable module definitions

yamt commented on a change in pull request #272: Sim: loadable module definitions
URL: https://github.com/apache/incubator-nuttx/pull/272#discussion_r379058535
 
 

 ##########
 File path: boards/sim/sim/sim/configs/cxxtest/Make.defs
 ##########
 @@ -88,10 +88,24 @@ CXXFLAGS = $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) \
 CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
 AFLAGS = $(CFLAGS) -D__ASSEMBLY__
 
+# Loadable module definitions
+
+CMODULEFLAGS = $(CFLAGS)
+# -fno-pic to avoid GOT relocations
+CMODULEFLAGS += -fno-pic
+
+LDMODULEFLAGS = -r -e module_initialize
+ifeq ($(WINTOOL),y)
+  LDMODULEFLAGS += -T "${shell cygpath -w $(TOPDIR)/libs/libc/modlib/gnu-elf.ld}"
+else
+  LDMODULEFLAGS += -T $(TOPDIR)/libs/libc/modlib/gnu-elf.ld
+endif
 
 # ELF module definitions
 
 CELFFLAGS = $(CFLAGS)
+# -fno-pic to avoid GOT relocations
+CELFFLAGS += -fno-pic
 CXXELFFLAGS = $(CXXFLAGS)
 
 Review comment:
   oops, fixed

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services