File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ def get_gcc_flags(self):
1717 return [
1818 "-nostdlib" ,
1919 "-ffreestanding" ,
20+ "-fno-toplevel-reorder" ,
2021 ]
2122
2223 def compile_primitive (self , src_path : str ) -> [str ]:
Original file line number Diff line number Diff line change 22#include "arch/utils.h"
33#include "memset.h"
44
5- // Must be the first variable
6- DECLARE_NOP_END (nop_end );
7-
8- const u8 items [] REL_ACCESS_STRING = MEMSET_ITEMS ;
9-
105void start (void ) {
116 u8 * items_rel ;
127
@@ -23,3 +18,8 @@ void start(void) {
2318
2419 JUMP_TO_NOP_END (nop_end );
2520}
21+
22+ const u8 items [] REL_ACCESS_STRING = MEMSET_ITEMS ;
23+
24+ // Must be the last variable
25+ DECLARE_NOP_END (nop_end );
Original file line number Diff line number Diff line change 22#include "arch/utils.h"
33#include "print.h"
44
5- // Must be the first variable
6- DECLARE_NOP_END (nop_end );
7-
8- const char print_string [] REL_ACCESS_STRING = PRINT_STRING ;
9-
105void start (void ) {
116 void (* print_func )(const char * ) = (void (* )(const char * ))PRINT_FUNCTION_ADDRESS ;
127 char * print_string_rel ;
@@ -16,3 +11,8 @@ void start(void) {
1611
1712 JUMP_TO_NOP_END (nop_end );
1813}
14+
15+ const char print_string [] REL_ACCESS_STRING = PRINT_STRING ;
16+
17+ // Must be the last variable
18+ DECLARE_NOP_END (nop_end );
You can’t perform that action at this time.
0 commit comments