mirror of
https://github.com/rhboot/gnu-efi
synced 2026-08-26 00:26:04 -04:00
48 lines
1.1 KiB
ArmAsm
48 lines
1.1 KiB
ArmAsm
/*
|
|
* Try to define the minimal empty init/ctor/dtor/fini_arrays so building with
|
|
* older or out-of-tree linker scripts will still work.
|
|
*/
|
|
/*
|
|
* Note that these aren't the using the GNU "CONSTRUCTOR" output section
|
|
* command, so they don't start with a size. Because of p2align and the
|
|
* end/END definitions, and the fact that they're mergeable, they can also
|
|
* have NULLs which aren't guaranteed to be at the end.
|
|
*/
|
|
#ifdef __ARMEL__
|
|
#define ARCH_SECTION(x) % ## x
|
|
#else
|
|
#define ARCH_SECTION(x) @ ## x
|
|
#endif
|
|
|
|
.section .init_array, "a", ARCH_SECTION(init_array)
|
|
.p2align 3, 0
|
|
.globl _init_array
|
|
_init_array:
|
|
.p2align 3, 0
|
|
.globl _init_array_end
|
|
_init_array_end:
|
|
.8byte 0
|
|
.section .ctors, "a", ARCH_SECTION(init_array)
|
|
.p2align 3, 0
|
|
.globl __CTOR_LIST__
|
|
__CTOR_LIST__:
|
|
.p2align 3, 0
|
|
.globl __CTOR_END__
|
|
__CTOR_END__:
|
|
.8byte 0
|
|
.section .dtors, "a", ARCH_SECTION(fini_array)
|
|
.p2align 3, 0
|
|
.globl __DTOR_LIST__
|
|
__DTOR_LIST__:
|
|
.p2align 3, 0
|
|
.globl __DTOR_END__
|
|
__DTOR_END__:
|
|
.8byte 0
|
|
.section .fini_array, "a", ARCH_SECTION(fini_array)
|
|
.p2align 3, 0
|
|
.globl _fini_array
|
|
_fini_array:
|
|
.p2align 3, 0
|
|
.globl _fini_array_end
|
|
_fini_array_end:
|
|
.8byte 0
|