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 17:16:47 UTC

[GitHub] [incubator-nuttx] yamt opened a new pull request #272: Sim: loadable module definitions

yamt opened a new pull request #272: Sim: loadable module definitions
URL: https://github.com/apache/incubator-nuttx/pull/272
 
 
   

----------------------------------------------------------------
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

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

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #272: Sim: loadable module definitions
URL: https://github.com/apache/incubator-nuttx/pull/272#discussion_r379018857
 
 

 ##########
 File path: boards/sim/sim/sim/configs/nsh2/Make.defs
 ##########
 @@ -84,10 +84,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:
   same comment as previous file

----------------------------------------------------------------
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

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

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #272: Sim: loadable module definitions
URL: https://github.com/apache/incubator-nuttx/pull/272#discussion_r379018268
 
 

 ##########
 File path: boards/sim/sim/sim/configs/cxxtest/Make.defs
 ##########
 @@ -128,6 +142,7 @@ ifeq ($(CONFIG_SIM_M32),y)
   LDLINKFLAGS += -melf_i386
   CCLINKFLAGS += -m32
   LDFLAGS += -m32
+  LDMODULEFLAGS += -melf_i386
 
 Review comment:
   LDELFFLAGS need -melf_i386 too

----------------------------------------------------------------
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

[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #272: Sim: loadable module definitions

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #272: Sim: loadable module definitions
URL: https://github.com/apache/incubator-nuttx/pull/272
 
 
   

----------------------------------------------------------------
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

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

Posted by GitBox <gi...@apache.org>.
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

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

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #272: Sim: loadable module definitions
URL: https://github.com/apache/incubator-nuttx/pull/272#discussion_r379018520
 
 

 ##########
 File path: boards/sim/sim/sim/configs/nsh2/Make.defs
 ##########
 @@ -120,6 +134,7 @@ ifeq ($(CONFIG_SIM_M32),y)
   LDLINKFLAGS		+= -melf_i386
   CCLINKFLAGS		+= -m32
   LDFLAGS		+= -m32
+  LDMODULEFLAGS += -melf_i386
 
 Review comment:
   align with other line

----------------------------------------------------------------
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

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

Posted by GitBox <gi...@apache.org>.
yamt commented on a change in pull request #272: Sim: loadable module definitions
URL: https://github.com/apache/incubator-nuttx/pull/272#discussion_r379058649
 
 

 ##########
 File path: boards/sim/sim/sim/configs/nsh2/Make.defs
 ##########
 @@ -120,6 +134,7 @@ ifeq ($(CONFIG_SIM_M32),y)
   LDLINKFLAGS		+= -melf_i386
   CCLINKFLAGS		+= -m32
   LDFLAGS		+= -m32
+  LDMODULEFLAGS += -melf_i386
 
 Review comment:
   done

----------------------------------------------------------------
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

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

Posted by GitBox <gi...@apache.org>.
yamt commented on a change in pull request #272: Sim: loadable module definitions
URL: https://github.com/apache/incubator-nuttx/pull/272#discussion_r379058589
 
 

 ##########
 File path: boards/sim/sim/sim/configs/cxxtest/Make.defs
 ##########
 @@ -128,6 +142,7 @@ ifeq ($(CONFIG_SIM_M32),y)
   LDLINKFLAGS += -melf_i386
   CCLINKFLAGS += -m32
   LDFLAGS += -m32
+  LDMODULEFLAGS += -melf_i386
 
 Review comment:
   done

----------------------------------------------------------------
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

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

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #272: Sim: loadable module definitions
URL: https://github.com/apache/incubator-nuttx/pull/272#discussion_r379017794
 
 

 ##########
 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:
   need -fnop-pic too

----------------------------------------------------------------
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

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

Posted by GitBox <gi...@apache.org>.
yamt commented on a change in pull request #272: Sim: loadable module definitions
URL: https://github.com/apache/incubator-nuttx/pull/272#discussion_r379058763
 
 

 ##########
 File path: boards/sim/sim/sim/configs/nsh2/Make.defs
 ##########
 @@ -84,10 +84,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:
   done for all three files

----------------------------------------------------------------
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