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 = . ;
|
_sctors = . ;
|
||||||
*(.ctors) /* Old ABI: Unallocated */
|
*(.ctors) /* Old ABI: Unallocated */
|
||||||
*(.init_array) /* New ABI: Allocated */
|
*(.init_array) /* New ABI: Allocated */
|
||||||
|
*(SORT(.init_array.*))
|
||||||
_ectors = . ;
|
_ectors = . ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,6 +84,7 @@ SECTIONS
|
|||||||
_sdtors = . ;
|
_sdtors = . ;
|
||||||
*(.dtors) /* Old ABI: Unallocated */
|
*(.dtors) /* Old ABI: Unallocated */
|
||||||
*(.fini_array) /* New ABI: Allocated */
|
*(.fini_array) /* New ABI: Allocated */
|
||||||
|
*(SORT(.fini_array.*))
|
||||||
_edtors = . ;
|
_edtors = . ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user