瀏覽代碼

fix(linker): old 'ctors' won't be called

greatbridf 2 年之前
父節點
當前提交
896023acbf
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      ldscript.ld

+ 2 - 0
ldscript.ld

@@ -48,6 +48,8 @@ SECTIONS
         start_ctors = .;
         KEEP(*(.init_array));
         KEEP(*(SORT_BY_INIT_PRIORITY(.init_array*)));
+        KEEP(*(.ctors));
+        KEEP(*(SORT_BY_INIT_PRIORITY(.ctors*)));
         end_ctors = .;
 
         *(.data)