nuttx/x86_64:Add _sinit and _einit initialization.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
This commit is contained in:
parent
696e1a3f70
commit
68e25dcee6
|
@ -31,7 +31,15 @@ SECTIONS
|
||||||
_etext = ABSOLUTE(.);
|
_etext = ABSOLUTE(.);
|
||||||
}
|
}
|
||||||
|
|
||||||
.text ALIGN (0x1000) : {
|
.init_section ALIGN(0x1000) :
|
||||||
|
{
|
||||||
|
_sinit = ABSOLUTE(.);
|
||||||
|
KEEP(*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
|
||||||
|
KEEP(*(.init_array EXCLUDE_FILE(*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o) .ctors))
|
||||||
|
_einit = ABSOLUTE(.);
|
||||||
|
}
|
||||||
|
|
||||||
|
.rodata ALIGN (0x1000) : {
|
||||||
_srodata = ABSOLUTE(.);
|
_srodata = ABSOLUTE(.);
|
||||||
*(.rodata .rodata.*)
|
*(.rodata .rodata.*)
|
||||||
*(.fixup)
|
*(.fixup)
|
||||||
|
|
|
@ -77,6 +77,14 @@ SECTIONS
|
||||||
_etext = ABSOLUTE(.);
|
_etext = ABSOLUTE(.);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.init_section ALIGN(0x1000) :
|
||||||
|
{
|
||||||
|
_sinit = ABSOLUTE(.);
|
||||||
|
KEEP(*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
|
||||||
|
KEEP(*(.init_array EXCLUDE_FILE(*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o) .ctors))
|
||||||
|
. = ALIGN(4096);
|
||||||
|
_einit = ABSOLUTE(.);
|
||||||
|
}
|
||||||
|
|
||||||
.rodata ALIGN(0x1000) :
|
.rodata ALIGN(0x1000) :
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue