You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/cplusplus/README.md
+41-1Lines changed: 41 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,4 +10,44 @@ Because RT-Thread RTOS is used in embedded system mostly, there are some rules f
10
10
4. Static class variables are discouraged. The time and place to call their constructor function could not be precisely controlled and make multi-threaded programming a nightmare.
11
11
5. Multiple inheritance is strongly discouraged, as it can cause intolerable confusion.
12
12
13
-
*NOTE*: For armcc compiler, the libc must be enable.
13
+
*NOTE*: The libc must be enable.
14
+
15
+
About GNU GCC compiler
16
+
17
+
please add following string in your ld link script:
18
+
// in your .text section
19
+
PROVIDE(__ctors_start__ = .);
20
+
/* old GCC version uses .ctors */
21
+
KEEP(*(SORT(.ctors.*)))
22
+
KEEP(*(.ctors))
23
+
/* new GCC version uses .init_array */
24
+
KEEP (*(SORT(.init_array.*)))
25
+
KEEP (*(.init_array))
26
+
PROVIDE(__ctors_end__ = .);
27
+
28
+
. = ALIGN(4);
29
+
30
+
// as a standalone section if you use ARM target.
31
+
32
+
/* The .ARM.exidx section is used for C++ exception handling. */
33
+
/* .ARM.exidx is sorted, so has to go in its own output section. */
34
+
__exidx_start = .;
35
+
.ARM.exidx :
36
+
{
37
+
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
38
+
39
+
/* This is used by the startup in order to initialize the .data secion */
40
+
_sidata = .;
41
+
} > CODE
42
+
__exidx_end = .;
43
+
44
+
/* .data section which is used for initialized data */
0 commit comments