diff options
Diffstat (limited to 'gnuefi')
-rw-r--r-- | gnuefi/elf_aarch64_efi.lds | 28 | ||||
-rw-r--r-- | gnuefi/elf_arm_efi.lds | 28 | ||||
-rw-r--r-- | gnuefi/elf_ia32_efi.lds | 27 | ||||
-rw-r--r-- | gnuefi/elf_ia32_fbsd_efi.lds | 27 | ||||
-rw-r--r-- | gnuefi/elf_ia64_efi.lds | 28 | ||||
-rw-r--r-- | gnuefi/elf_mips64el_efi.lds | 27 | ||||
-rw-r--r-- | gnuefi/elf_riscv64_efi.lds | 4 | ||||
-rw-r--r-- | gnuefi/elf_x86_64_efi.lds | 27 | ||||
-rw-r--r-- | gnuefi/elf_x86_64_fbsd_efi.lds | 27 |
9 files changed, 158 insertions, 65 deletions
diff --git a/gnuefi/elf_aarch64_efi.lds b/gnuefi/elf_aarch64_efi.lds index 563e22d..c487d8d 100644 --- a/gnuefi/elf_aarch64_efi.lds +++ b/gnuefi/elf_aarch64_efi.lds @@ -48,18 +48,25 @@ SECTIONS * have NULLs which aren't guaranteed to be at the end. */ . = ALIGN(16); - _init_array = .; - *(SORT_BY_NAME(.init_array)) - _init_array_end = .; + __init_array_start = .; + *(SORT(.init_array.*)) + *(.init_array) + __init_array_end = .; + . = ALIGN(16); __CTOR_LIST__ = .; - *(SORT_BY_NAME(.ctors)) + *(SORT(.ctors.*)) + *(.ctors) __CTOR_END__ = .; + . = ALIGN(16); __DTOR_LIST__ = .; - *(SORT_BY_NAME(.dtors)) + *(SORT(.dtors.*)) + *(.dtors) __DTOR_END__ = .; - _fini_array = .; - *(SORT_BY_NAME(.fini_array)) - _fini_array_end = .; + . = ALIGN(16); + __fini_array_start = .; + *(SORT(.fini_array.*)) + *(.fini_array) + __fini_array_end = .; /* the EFI loader doesn't seem to like a .bss section, so we stick it all into .data: */ @@ -84,6 +91,11 @@ SECTIONS *(.rela.got) *(.rela.dyn) *(.rela.stab) + *(.rela.init_array*) + *(.rela.fini_array*) + *(.rela.ctors*) + *(.rela.dtors*) + } . = ALIGN(4096); .rela.plt : { *(.rela.plt) } diff --git a/gnuefi/elf_arm_efi.lds b/gnuefi/elf_arm_efi.lds index 3023ebc..b656440 100644 --- a/gnuefi/elf_arm_efi.lds +++ b/gnuefi/elf_arm_efi.lds @@ -35,18 +35,25 @@ SECTIONS * have NULLs which aren't guaranteed to be at the end. */ . = ALIGN(16); - _init_array = .; - *(SORT_BY_NAME(.init_array)) - _init_array_end = .; + __init_array_start = .; + *(SORT(.init_array.*)) + *(.init_array) + __init_array_end = .; + . = ALIGN(16); __CTOR_LIST__ = .; - *(SORT_BY_NAME(.ctors)) + *(SORT(.ctors.*)) + *(.ctors) __CTOR_END__ = .; + . = ALIGN(16); __DTOR_LIST__ = .; - *(SORT_BY_NAME(.dtors)) + *(SORT(.dtors.*)) + *(.dtors) __DTOR_END__ = .; - _fini_array = .; - *(SORT_BY_NAME(.fini_array)) - _fini_array_end = .; + . = ALIGN(16); + __fini_array_start = .; + *(SORT(.fini_array.*)) + *(.fini_array) + __fini_array_end = .; /* the EFI loader doesn't seem to like a .bss section, so we stick it all into .data: */ @@ -70,6 +77,11 @@ SECTIONS *(.rel.got) *(.rel.dyn) *(.rel.stab) + *(.rel.init_array*) + *(.rel.fini_array*) + *(.rel.ctors*) + *(.rel.dtors*) + } . = ALIGN(4096); .rel.plt : { *(.rel.plt) } diff --git a/gnuefi/elf_ia32_efi.lds b/gnuefi/elf_ia32_efi.lds index 5eec529..a84c673 100644 --- a/gnuefi/elf_ia32_efi.lds +++ b/gnuefi/elf_ia32_efi.lds @@ -39,18 +39,25 @@ SECTIONS * have NULLs which aren't guaranteed to be at the end. */ . = ALIGN(16); - _init_array = .; - *(SORT_BY_NAME(.init_array)) - _init_array_end = .; + __init_array_start = .; + *(SORT(.init_array.*)) + *(.init_array) + __init_array_end = .; + . = ALIGN(16); __CTOR_LIST__ = .; - *(SORT_BY_NAME(.ctors)) + *(SORT(.ctors.*)) + *(.ctors) __CTOR_END__ = .; + . = ALIGN(16); __DTOR_LIST__ = .; - *(SORT_BY_NAME(.dtors)) + *(SORT(.dtors.*)) + *(.dtors) __DTOR_END__ = .; - _fini_array = .; - *(SORT_BY_NAME(.fini_array)) - _fini_array_end = .; + . = ALIGN(16); + __fini_array_start = .; + *(SORT(.fini_array.*)) + *(.fini_array) + __fini_array_end = .; /* the EFI loader doesn't seem to like a .bss section, so we stick it all into .data: */ @@ -70,6 +77,10 @@ SECTIONS *(.rel.got) *(.rel.dyn) *(.rel.stab) + *(.rel.init_array*) + *(.rel.fini_array*) + *(.rel.ctors*) + *(.rel.dtors*) *(.data.rel.ro.local) *(.data.rel.local) *(.data.rel.ro) diff --git a/gnuefi/elf_ia32_fbsd_efi.lds b/gnuefi/elf_ia32_fbsd_efi.lds index 9e9baec..61ae5c5 100644 --- a/gnuefi/elf_ia32_fbsd_efi.lds +++ b/gnuefi/elf_ia32_fbsd_efi.lds @@ -48,18 +48,25 @@ SECTIONS * have NULLs which aren't guaranteed to be at the end. */ . = ALIGN(16); - _init_array = .; - *(SORT_BY_NAME(.init_array)) - _init_array_end = .; + __init_array_start = .; + *(SORT(.init_array.*)) + *(.init_array) + __init_array_end = .; + . = ALIGN(16); __CTOR_LIST__ = .; - *(SORT_BY_NAME(.ctors)) + *(SORT(.ctors.*)) + *(.ctors) __CTOR_END__ = .; + . = ALIGN(16); __DTOR_LIST__ = .; - *(SORT_BY_NAME(.dtors)) + *(SORT(.dtors.*)) + *(.dtors) __DTOR_END__ = .; - _fini_array = .; - *(SORT_BY_NAME(.fini_array)) - _fini_array_end = .; + . = ALIGN(16); + __fini_array_start = .; + *(SORT(.fini_array.*)) + *(.fini_array) + __fini_array_end = .; /* the EFI loader doesn't seem to like a .bss section, so we stick it all into .data: */ @@ -80,6 +87,10 @@ SECTIONS *(.rel.data.*) *(.rel.got) *(.rel.stab) + *(.rel.init_array*) + *(.rel.fini_array*) + *(.rel.ctors*) + *(.rel.dtors*) *(.data.rel.ro.local) *(.data.rel.local) *(.data.rel.ro) diff --git a/gnuefi/elf_ia64_efi.lds b/gnuefi/elf_ia64_efi.lds index e45799c..74014ce 100644 --- a/gnuefi/elf_ia64_efi.lds +++ b/gnuefi/elf_ia64_efi.lds @@ -49,18 +49,25 @@ SECTIONS * have NULLs which aren't guaranteed to be at the end. */ . = ALIGN(16); - _init_array = .; - *(SORT_BY_NAME(.init_array)) - _init_array_end = .; + __init_array_start = .; + *(SORT(.init_array.*)) + *(.init_array) + __init_array_end = .; + . = ALIGN(16); __CTOR_LIST__ = .; - *(SORT_BY_NAME(.ctors)) + *(SORT(.ctors.*)) + *(.ctors) __CTOR_END__ = .; + . = ALIGN(16); __DTOR_LIST__ = .; - *(SORT_BY_NAME(.dtors)) + *(SORT(.dtors.*)) + *(.dtors) __DTOR_END__ = .; - _fini_array = .; - *(SORT_BY_NAME(.fini_array)) - _fini_array_end = .; + . = ALIGN(16); + __fini_array_start = .; + *(SORT(.fini_array.*)) + *(.fini_array) + __fini_array_end = .; /* the EFI loader doesn't seem to like a .bss section, so we stick it all into .data: */ @@ -82,7 +89,10 @@ SECTIONS *(.rela.dyn) *(.rela.gnu.linkonce.d*) *(.rela.stab) - *(.rela.ctors) + *(.rela.init_array*) + *(.rela.fini_array*) + *(.rela.ctors*) + *(.rela.dtors*) } . = ALIGN(4096); .rela.plt : { *(.rela.plt) } diff --git a/gnuefi/elf_mips64el_efi.lds b/gnuefi/elf_mips64el_efi.lds index bf96841..a9fe787 100644 --- a/gnuefi/elf_mips64el_efi.lds +++ b/gnuefi/elf_mips64el_efi.lds @@ -36,18 +36,25 @@ SECTIONS * have NULLs which aren't guaranteed to be at the end. */ . = ALIGN(16); - _init_array = .; - *(SORT_BY_NAME(.init_array)) - _init_array_end = .; + __init_array_start = .; + *(SORT(.init_array.*)) + *(.init_array) + __init_array_end = .; + . = ALIGN(16); __CTOR_LIST__ = .; - *(SORT_BY_NAME(.ctors)) + *(SORT(.ctors.*)) + *(.ctors) __CTOR_END__ = .; + . = ALIGN(16); __DTOR_LIST__ = .; - *(SORT_BY_NAME(.dtors)) + *(SORT(.dtors.*)) + *(.dtors) __DTOR_END__ = .; - _fini_array = .; - *(SORT_BY_NAME(.fini_array)) - _fini_array_end = .; + . = ALIGN(16); + __fini_array_start = .; + *(SORT(.fini_array.*)) + *(.fini_array) + __fini_array_end = .; /* the EFI loader doesn't seem to like a .bss section, so we stick it all into .data: */ @@ -70,6 +77,10 @@ SECTIONS *(.rel.got) *(.rel.dyn) *(.rel.stab) + *(.rel.init_array*) + *(.rel.fini_array*) + *(.rel.ctors*) + *(.rel.dtors*) } . = ALIGN(4096); .rel.plt : { *(.rel.plt) } diff --git a/gnuefi/elf_riscv64_efi.lds b/gnuefi/elf_riscv64_efi.lds index 3b47247..d5153e9 100644 --- a/gnuefi/elf_riscv64_efi.lds +++ b/gnuefi/elf_riscv64_efi.lds @@ -52,6 +52,10 @@ SECTIONS { *(.rela.got) *(.rela.dyn) *(.rela.stab) + *(.rela.init_array) + *(.rela.fini_array) + *(.rela.ctors) + *(.rela.dtors) } . = ALIGN(4096); .rela.plt : { *(.rela.plt) } diff --git a/gnuefi/elf_x86_64_efi.lds b/gnuefi/elf_x86_64_efi.lds index 2e0e0cb..0f4b63b 100644 --- a/gnuefi/elf_x86_64_efi.lds +++ b/gnuefi/elf_x86_64_efi.lds @@ -46,18 +46,25 @@ SECTIONS * have NULLs which aren't guaranteed to be at the end. */ . = ALIGN(16); - _init_array = .; - *(SORT_BY_NAME(.init_array)) - _init_array_end = .; + __init_array_start = .; + *(SORT(.init_array.*)) + *(.init_array) + __init_array_end = .; + . = ALIGN(16); __CTOR_LIST__ = .; - *(SORT_BY_NAME(.ctors)) + *(SORT(.ctors.*)) + *(.ctors) __CTOR_END__ = .; + . = ALIGN(16); __DTOR_LIST__ = .; - *(SORT_BY_NAME(.dtors)) + *(SORT(.dtors.*)) + *(.dtors) __DTOR_END__ = .; - _fini_array = .; - *(SORT_BY_NAME(.fini_array)) - _fini_array_end = .; + . = ALIGN(16); + __fini_array_start = .; + *(SORT(.fini_array.*)) + *(.fini_array) + __fini_array_end = .; /* the EFI loader doesn't seem to like a .bss section, so we stick it all into .data: */ @@ -82,6 +89,10 @@ SECTIONS *(.rela.got) *(.rela.dyn) *(.rela.stab) + *(.rela.init_array*) + *(.rela.fini_array*) + *(.rela.ctors*) + *(.rela.dtors*) } . = ALIGN(4096); .rela.plt : { *(.rela.plt) } diff --git a/gnuefi/elf_x86_64_fbsd_efi.lds b/gnuefi/elf_x86_64_fbsd_efi.lds index 721ce9a..dd10d88 100644 --- a/gnuefi/elf_x86_64_fbsd_efi.lds +++ b/gnuefi/elf_x86_64_fbsd_efi.lds @@ -44,18 +44,25 @@ SECTIONS * have NULLs which aren't guaranteed to be at the end. */ . = ALIGN(16); - _init_array = .; - *(SORT_BY_NAME(.init_array)) - _init_array_end = .; + __init_array_start = .; + *(SORT(.init_array.*)) + *(.init_array) + __init_array_end = .; + . = ALIGN(16); __CTOR_LIST__ = .; - *(SORT_BY_NAME(.ctors)) + *(SORT(.ctors.*)) + *(.ctors) __CTOR_END__ = .; + . = ALIGN(16); __DTOR_LIST__ = .; - *(SORT_BY_NAME(.dtors)) + *(SORT(.dtors.*)) + *(.dtors) __DTOR_END__ = .; - _fini_array = .; - *(SORT_BY_NAME(.fini_array)) - _fini_array_end = .; + . = ALIGN(16); + __fini_array_start = .; + *(SORT(.fini_array.*)) + *(.fini_array) + __fini_array_end = .; /* the EFI loader doesn't seem to like a .bss section, so we stick it all into .data: */ @@ -76,6 +83,10 @@ SECTIONS *(.rela.data*) *(.rela.got) *(.rela.stab) + *(.rela.init_array*) + *(.rela.fini_array*) + *(.rela.ctors*) + *(.rela.dtors*) } _edata = .; _data_size = . - _etext; |