Ver código fonte

Merge /u/gmbr3/gnu-efi/ branch function-sections into master

https://sourceforge.net/p/gnu-efi/code/merge-requests/38/
b'Nigel Croxon 2 anos atrás
pai
commit
330c88aa0c

+ 5 - 6
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);
@@ -61,6 +60,7 @@ SECTIONS
     *(.rela.data*)
     *(.rela.got)
     *(.rela.plt)
+    *(.rela.dyn)
     *(.rela.stab)
   }
   . = ALIGN(512);
@@ -76,7 +76,6 @@ SECTIONS
   .ignored.reloc :
   {
     *(.rela.reloc)
-    *(.eh_frame)
     *(.note.GNU-stack)
   }
   .comment 0 : { *(.comment) }

+ 1 - 0
gnuefi/elf_arm_efi.lds

@@ -47,6 +47,7 @@ SECTIONS
     *(.rel.data*)
     *(.rel.got)
     *(.rel.plt)
+    *(.rel.dyn)
     *(.rel.stab)
   }
   _edata = .;

+ 4 - 2
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) }
@@ -60,6 +62,7 @@ SECTIONS
     *(.rel.data*)
     *(.rel.got)
     *(.rel.plt)
+    *(.rel.dyn)
     *(.rel.stab)
     *(.data.rel.ro.local)
     *(.data.rel.local)
@@ -82,7 +85,6 @@ SECTIONS
   /DISCARD/ :
   {
     *(.rel.reloc)
-    *(.eh_frame)
     *(.note.GNU-stack)
   }
   .comment 0 : { *(.comment) }

+ 4 - 1
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) }
@@ -57,6 +59,7 @@ SECTIONS
     *(.rela.data*)
     *(.rela.got)
     *(.rela.plt)
+    *(.rela.dyn)
     *(.rela.gnu.linkonce.d*)
     *(.rela.stab)
     *(.rela.ctors)

+ 2 - 1
gnuefi/elf_mips64el_efi.lds

@@ -35,7 +35,7 @@ SECTIONS
    *(.sbss)
    *(.scommon)
    *(.dynbss)
-   *(.bss)
+   *(.bss*)
    *(COMMON)
    . = ALIGN(16);
    _bss_end = .;
@@ -47,6 +47,7 @@ SECTIONS
     *(.rel.data*)
     *(.rel.got)
     *(.rel.plt)
+    *(.rel.dyn)
     *(.rel.stab)
   }
   _edata = .;

+ 2 - 1
gnuefi/elf_riscv64_efi.lds

@@ -38,7 +38,7 @@ SECTIONS {
 		*(.sbss)
 		*(.scommon)
 		*(.dynbss)
-		*(.bss)
+		*(.bss*)
 		*(COMMON)
 		. = ALIGN(16);
 		_bss_end = .;
@@ -50,6 +50,7 @@ SECTIONS {
     *(.rela.data*)
     *(.rela.got)
     *(.rela.plt)
+    *(.rela.dyn)
     *(.rela.stab)
   }
 	. = ALIGN(512);

+ 4 - 6
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)
   }
@@ -61,6 +59,7 @@ SECTIONS
     *(.rela.data*)
     *(.rela.got)
     *(.rela.plt)
+    *(.rela.dyn)
     *(.rela.stab)
   }
   . = ALIGN(4096);
@@ -71,7 +70,6 @@ SECTIONS
   .ignored.reloc :
   {
     *(.rela.reloc)
-    *(.eh_frame)
     *(.note.GNU-stack)
   }
   .comment 0 : { *(.comment) }