summaryrefslogtreecommitdiff
path: root/gnuefi
diff options
context:
space:
mode:
authorCallum Farmer <gmbr3@opensuse.org>2023-03-03 20:30:23 +0000
committerCallum Farmer <gmbr3@opensuse.org>2023-03-03 21:00:32 +0000
commit15f10734e7e8354a6b4477046ea67d495348de0c (patch)
treeeddb87ba8060fd875e2907e14b53117be8549560 /gnuefi
parenteea6d31a22efbd20ccbce3e02b685e3ea0740153 (diff)
downloadgnu-efi-15f10734e7e8354a6b4477046ea67d495348de0c.tar.gz
Add some COMDAT sections
When using function/data sections option from gcc, some additional un-packed sections get created move these to there correct placement if not already included sections seen on x86/x86_64/aarch64: .gcc_except_table.efi_main .bss.debugging .gcc_except_table.* only appears on objcopy archs Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
Diffstat (limited to 'gnuefi')
-rw-r--r--gnuefi/elf_aarch64_efi.lds10
-rw-r--r--gnuefi/elf_ia32_efi.lds5
-rw-r--r--gnuefi/elf_ia64_efi.lds4
-rw-r--r--gnuefi/elf_mips64el_efi.lds2
-rw-r--r--gnuefi/elf_riscv64_efi.lds2
-rw-r--r--gnuefi/elf_x86_64_efi.lds9
6 files changed, 15 insertions, 17 deletions
diff --git a/gnuefi/elf_aarch64_efi.lds b/gnuefi/elf_aarch64_efi.lds
index 8c0fad0..3508ada 100644
--- a/gnuefi/elf_aarch64_efi.lds
+++ b/gnuefi/elf_aarch64_efi.lds
@@ -9,10 +9,9 @@ SECTIONS
.hash : { *(.hash) }
.gnu.hash : { *(.gnu.hash) }
. = ALIGN(4096);
- .eh_frame :
- {
- *(.eh_frame)
- }
+ .eh_frame : { *(.eh_frame) }
+ .gcc_except_table : { *(.gcc_except_table*) }
+ . = ALIGN(4096);
.text : {
_text = .;
*(.text)
@@ -48,7 +47,7 @@ SECTIONS
*(.sbss)
*(.scommon)
*(.dynbss)
- *(.bss)
+ *(.bss*)
*(COMMON)
*(.rel.local)
. = ALIGN(16);
@@ -77,7 +76,6 @@ SECTIONS
.ignored.reloc :
{
*(.rela.reloc)
- *(.eh_frame)
*(.note.GNU-stack)
}
.comment 0 : { *(.comment) }
diff --git a/gnuefi/elf_ia32_efi.lds b/gnuefi/elf_ia32_efi.lds
index 7c3e59a..ef99087 100644
--- a/gnuefi/elf_ia32_efi.lds
+++ b/gnuefi/elf_ia32_efi.lds
@@ -8,6 +8,8 @@ SECTIONS
/* .hash and/or .gnu.hash MUST come first! */
.hash : { *(.hash) }
.gnu.hash : { *(.gnu.hash) }
+ .eh_frame : { *(.eh_frame) }
+ .gcc_except_table : { *(.gcc_except_table*) }
. = ALIGN(4096);
.text :
{
@@ -45,7 +47,7 @@ SECTIONS
*(.sbss)
*(.scommon)
*(.dynbss)
- *(.bss)
+ *(.bss*)
*(COMMON)
}
.note.gnu.build-id : { *(.note.gnu.build-id) }
@@ -82,7 +84,6 @@ SECTIONS
/DISCARD/ :
{
*(.rel.reloc)
- *(.eh_frame)
*(.note.GNU-stack)
}
.comment 0 : { *(.comment) }
diff --git a/gnuefi/elf_ia64_efi.lds b/gnuefi/elf_ia64_efi.lds
index e76d67d..05b0f36 100644
--- a/gnuefi/elf_ia64_efi.lds
+++ b/gnuefi/elf_ia64_efi.lds
@@ -8,6 +8,8 @@ SECTIONS
/* .hash and/or .gnu.hash MUST come first! */
.hash : { *(.hash) }
.gnu.hash : { *(.gnu.hash) }
+ .eh_frame : { *(.eh_frame) }
+ .gcc_except_table : { *(.gcc_except_table*) }
. = ALIGN(4096);
.text :
{
@@ -42,7 +44,7 @@ SECTIONS
/* the EFI loader doesn't seem to like a .bss section, so we stick
it all into .data: */
*(.dynbss)
- *(.bss)
+ *(.bss*)
*(COMMON)
}
.note.gnu.build-id : { *(.note.gnu.build-id) }
diff --git a/gnuefi/elf_mips64el_efi.lds b/gnuefi/elf_mips64el_efi.lds
index 69cb3a5..e53a16d 100644
--- a/gnuefi/elf_mips64el_efi.lds
+++ b/gnuefi/elf_mips64el_efi.lds
@@ -35,7 +35,7 @@ SECTIONS
*(.sbss)
*(.scommon)
*(.dynbss)
- *(.bss)
+ *(.bss*)
*(COMMON)
. = ALIGN(16);
_bss_end = .;
diff --git a/gnuefi/elf_riscv64_efi.lds b/gnuefi/elf_riscv64_efi.lds
index 2f84758..453ef79 100644
--- a/gnuefi/elf_riscv64_efi.lds
+++ b/gnuefi/elf_riscv64_efi.lds
@@ -38,7 +38,7 @@ SECTIONS {
*(.sbss)
*(.scommon)
*(.dynbss)
- *(.bss)
+ *(.bss*)
*(COMMON)
. = ALIGN(16);
_bss_end = .;
diff --git a/gnuefi/elf_x86_64_efi.lds b/gnuefi/elf_x86_64_efi.lds
index b1379ee..3a8e140 100644
--- a/gnuefi/elf_x86_64_efi.lds
+++ b/gnuefi/elf_x86_64_efi.lds
@@ -10,10 +10,8 @@ SECTIONS
.hash : { *(.hash) }
.gnu.hash : { *(.gnu.hash) }
. = ALIGN(4096);
- .eh_frame :
- {
- *(.eh_frame)
- }
+ .eh_frame : { *(.eh_frame) }
+ .gcc_except_table : { *(.gcc_except_table*) }
. = ALIGN(4096);
.text :
{
@@ -44,7 +42,7 @@ SECTIONS
*(.sbss)
*(.scommon)
*(.dynbss)
- *(.bss)
+ *(.bss*)
*(COMMON)
*(.rel.local)
}
@@ -72,7 +70,6 @@ SECTIONS
.ignored.reloc :
{
*(.rela.reloc)
- *(.eh_frame)
*(.note.GNU-stack)
}
.comment 0 : { *(.comment) }