Skip to content

Commit 065e1cd

Browse files
clazissartemiy-volkov
authored andcommitted
[CTOR/DTOR] link with crti,crtend,crtbegin, and crtn
1 parent 8703ee8 commit 065e1cd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

gcc/config/arc64/elf.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,11 @@ along with GCC; see the file COPYING3. If not see
2525
#undef LINK_GCC_C_SEQUENCE_SPEC
2626
#define LINK_GCC_C_SEQUENCE_SPEC \
2727
"--start-group %G %{!specs=*:%{!nolibc:-lc -lnosys}} --end-group"
28+
29+
/* Make sure we include the crtbegin.o. */
30+
#undef STARTFILE_SPEC
31+
#define STARTFILE_SPEC "crt0.o%s crti%O%s crtbegin.o%s"
32+
33+
/* ...and crtend.o. */
34+
#undef ENDFILE_SPEC
35+
#define ENDFILE_SPEC "crtend.o%s crtn%O%s"

0 commit comments

Comments
 (0)