modlib:need add ctors to init_array and dtors to fini_array
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
parent
d8bdf23e8a
commit
c62b35a12c
1 changed files with 5 additions and 2 deletions
|
@ -36,13 +36,16 @@ SECTIONS
|
|||
.init_array :
|
||||
{
|
||||
_sinit = .;
|
||||
*(.init_array)
|
||||
KEEP(*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
|
||||
KEEP(*(.init_array .ctors))
|
||||
_einit = .;
|
||||
}
|
||||
|
||||
.fini_array :
|
||||
{
|
||||
*(.fini_array)
|
||||
KEEP (*(.dtors))
|
||||
KEEP (*(.fini_array))
|
||||
KEEP (*(SORT(.fini_array.*)))
|
||||
}
|
||||
|
||||
.rodata :
|
||||
|
|
Loading…
Reference in a new issue