mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 10:58:49 +08:00
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 :
|
.init_array :
|
||||||
{
|
{
|
||||||
_sinit = .;
|
_sinit = .;
|
||||||
*(.init_array)
|
KEEP(*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
|
||||||
|
KEEP(*(.init_array .ctors))
|
||||||
_einit = .;
|
_einit = .;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fini_array :
|
.fini_array :
|
||||||
{
|
{
|
||||||
*(.fini_array)
|
KEEP (*(.dtors))
|
||||||
|
KEEP (*(.fini_array))
|
||||||
|
KEEP (*(SORT(.fini_array.*)))
|
||||||
}
|
}
|
||||||
|
|
||||||
.rodata :
|
.rodata :
|
||||||
|
|
Loading…
Reference in a new issue