libelf: Support prioritized init and fini arrays.
Add a wildcard operator to gnu-elf.ld to ensure all c++ constructors and destruction are included in partially linked application binaries.
This commit is contained in:
parent
733807f635
commit
f4dcdbec0e
|
@ -75,6 +75,7 @@ SECTIONS
|
|||
_sctors = . ;
|
||||
*(.ctors) /* Old ABI: Unallocated */
|
||||
*(.init_array) /* New ABI: Allocated */
|
||||
*(SORT(.init_array.*))
|
||||
_ectors = . ;
|
||||
}
|
||||
|
||||
|
@ -83,6 +84,7 @@ SECTIONS
|
|||
_sdtors = . ;
|
||||
*(.dtors) /* Old ABI: Unallocated */
|
||||
*(.fini_array) /* New ABI: Allocated */
|
||||
*(SORT(.fini_array.*))
|
||||
_edtors = . ;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue