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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to