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


##########
arch/risc-v/src/common/crt0.c:
##########
@@ -88,6 +88,71 @@ static void sig_trampoline(void)
   );
 }
 
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
+
+#if defined(__cplusplus)
+extern "C"
+{
+#endif
+
+/* 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:
   Or move those externs to `riscv_internal.h` and place somewhere near
   ```
   EXTERN uint32_t _stext;           /* Start of .text */
   EXTERN uint32_t _etext;           /* End_1 of .text + .rodata */
   EXTERN const uint32_t _eronly;    /* End+1 of read only section (.text + 
.rodata) */
   EXTERN uint32_t _sdata;           /* Start of .data */
   EXTERN uint32_t _edata;           /* End+1 of .data */
   EXTERN uint32_t _sbss;            /* Start of .bss */
   EXTERN uint32_t _ebss;            /* End+1 of .bss */
   EXTERN uint32_t _stdata;          /* Start of .tdata */
   EXTERN uint32_t _etdata;          /* End+1 of .tdata */
   EXTERN uint32_t _stbss;           /* Start of .tbss */
   EXTERN uint32_t _etbss;           /* End+1 of .tbss */
   ```



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