diff options
author | Callum Farmer <gmbr3@opensuse.org> | 2023-04-28 17:46:24 +0100 |
---|---|---|
committer | Callum Farmer <gmbr3@opensuse.org> | 2023-05-04 14:29:36 +0100 |
commit | e2aa099738e1bd527929b5fb6fe7312962b6b4e4 (patch) | |
tree | 50212479249b73390ee018662048017746822a98 /gnuefi/elf_x86_64_efi.lds | |
parent | 4c938fac30954a54456300bcdad2fdd0b34b6210 (diff) | |
download | gnu-efi-e2aa099738e1bd527929b5fb6fe7312962b6b4e4.tar.gz |
lds: Support ctors/dtors with a priority
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
Diffstat (limited to 'gnuefi/elf_x86_64_efi.lds')
-rw-r--r-- | gnuefi/elf_x86_64_efi.lds | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/gnuefi/elf_x86_64_efi.lds b/gnuefi/elf_x86_64_efi.lds index 4aea2da..c9564a2 100644 --- a/gnuefi/elf_x86_64_efi.lds +++ b/gnuefi/elf_x86_64_efi.lds @@ -47,16 +47,20 @@ SECTIONS */ . = ALIGN(16); _init_array = .; - *(SORT_BY_NAME(.init_array)) + *(SORT(.init_array.*)) + *(.init_array) _init_array_end = .; __CTOR_LIST__ = .; - *(SORT_BY_NAME(.ctors)) + *(SORT(.ctors.*)) + *(.ctors) __CTOR_END__ = .; __DTOR_LIST__ = .; - *(SORT_BY_NAME(.dtors)) + *(SORT(.dtors.*)) + *(.dtors) __DTOR_END__ = .; _fini_array = .; - *(SORT_BY_NAME(.fini_array)) + *(SORT(.fini_array.*)) + *(.fini_array) _fini_array_end = .; /* the EFI loader doesn't seem to like a .bss section, so we stick @@ -82,10 +86,10 @@ SECTIONS *(.rela.got) *(.rela.dyn) *(.rela.stab) - *(.rela.init_array) - *(.rela.fini_array) - *(.rela.ctors) - *(.rela.dtors) + *(.rela.init_array*) + *(.rela.fini_array*) + *(.rela.ctors*) + *(.rela.dtors*) } . = ALIGN(4096); .rela.plt : { *(.rela.plt) } |