pussuw commented on code in PR #6235:
URL: https://github.com/apache/incubator-nuttx/pull/6235#discussion_r874596359


##########
arch/risc-v/src/common/crt0.c:
##########
@@ -88,6 +88,53 @@ static void sig_trampoline(void)
   );
 }
 
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
+
+/* Linker defined symbols to .ctors and .dtors */
+
+extern void (*_sctors)(void);
+extern void (*_ectors)(void);
+extern void (*_sdtors)(void);
+extern void (*_edtors)(void);

Review Comment:
   Yes, I am sure. I tested it and the file is a .c file, so it is compiled 
with gcc always. This file could be pre-compiled and it would still work for 
C++ just by linking the crt0.o object. This is how many toolchains in fact do 
it.
   
   Declaring these IMO don't belong to any public header, these are part of the 
CRT. I think this is the correct place, or optionally we can add another crtX.c 
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.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to