mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
nuttx/boards:Uniform initialization format for init_array.
(1) Keep the `.init_array` and `.ctors` symbols and sort them according to their initialization priority. (2) Exclude symbols ending with crtend.* and crtbegin.* to support c++ application.if we not exclude crtend.* crtbegin.* frame_dummy will be added when enable any c++ application with global variables, this symbol execution is problematic, removing it does not affect the application. Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
This commit is contained in:
parent
87ebdb850c
commit
e21885b84a
406 changed files with 582 additions and 429 deletions
|
|
@ -73,9 +73,8 @@ SECTIONS
|
|||
.ctors :
|
||||
{
|
||||
_sctors = . ;
|
||||
*(.ctors) /* Old ABI: Unallocated */
|
||||
*(.init_array) /* New ABI: Allocated */
|
||||
*(SORT(.init_array.*))
|
||||
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))
|
||||
_ectors = . ;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue