summaryrefslogtreecommitdiff
path: root/gnuefi/elf_x86_64_fbsd_efi.lds
diff options
context:
space:
mode:
Diffstat (limited to 'gnuefi/elf_x86_64_fbsd_efi.lds')
-rw-r--r--gnuefi/elf_x86_64_fbsd_efi.lds21
1 files changed, 21 insertions, 0 deletions
diff --git a/gnuefi/elf_x86_64_fbsd_efi.lds b/gnuefi/elf_x86_64_fbsd_efi.lds
index fe1f334..721ce9a 100644
--- a/gnuefi/elf_x86_64_fbsd_efi.lds
+++ b/gnuefi/elf_x86_64_fbsd_efi.lds
@@ -36,6 +36,27 @@ SECTIONS
*(.got)
*(.data*)
*(.sdata)
+
+ /*
+ * 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.
+ */
+ . = ALIGN(16);
+ _init_array = .;
+ *(SORT_BY_NAME(.init_array))
+ _init_array_end = .;
+ __CTOR_LIST__ = .;
+ *(SORT_BY_NAME(.ctors))
+ __CTOR_END__ = .;
+ __DTOR_LIST__ = .;
+ *(SORT_BY_NAME(.dtors))
+ __DTOR_END__ = .;
+ _fini_array = .;
+ *(SORT_BY_NAME(.fini_array))
+ _fini_array_end = .;
+
/* the EFI loader doesn't seem to like a .bss section, so we stick
it all into .data: */
*(.sbss)