Browse Source

Merge .plt into .text

ld writes .plt immediately after .text
which corrupts the alignment of .reloc

Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
Callum Farmer 1 year ago
parent
commit
8abf159da6

+ 1 - 0
gnuefi/elf_aarch64_efi.lds

@@ -17,6 +17,7 @@ SECTIONS
     *(.text)
     *(.text.*)
     *(.gnu.linkonce.t.*)
+    *(.plt)
     . = ALIGN(16);
   }
   _etext = .;

+ 1 - 0
gnuefi/elf_arm_efi.lds

@@ -9,6 +9,7 @@ SECTIONS
     *(.text)
     *(.text.*)
     *(.gnu.linkonce.t.*)
+    *(.plt)
     . = ALIGN(16);
   }
   _etext = .;

+ 1 - 0
gnuefi/elf_ia32_efi.lds

@@ -17,6 +17,7 @@ SECTIONS
    *(.text)
    *(.text.*)
    *(.gnu.linkonce.t.*)
+   *(.plt)
    . = ALIGN(16);
   }
   _etext = .;

+ 1 - 0
gnuefi/elf_ia64_efi.lds

@@ -17,6 +17,7 @@ SECTIONS
    *(.text)
    *(.text.*)
    *(.gnu.linkonce.t.*)
+   *(.plt)
    . = ALIGN(16);
   }
   _etext = .;

+ 1 - 0
gnuefi/elf_loongarch64_efi.lds

@@ -9,6 +9,7 @@ SECTIONS
     *(.text)
     *(.text.*)
     *(.gnu.linkonce.t.*)
+    *(.plt)
     . = ALIGN(16);
   }
   _etext = .;

+ 1 - 0
gnuefi/elf_mips64el_efi.lds

@@ -9,6 +9,7 @@ SECTIONS
     *(.text)
     *(.text.*)
     *(.gnu.linkonce.t.*)
+    *(.plt)
     . = ALIGN(16);
   }
   _etext = .;

+ 1 - 0
gnuefi/elf_riscv64_efi.lds

@@ -11,6 +11,7 @@ SECTIONS {
 		*(.text)
 		*(.text.*)
 		*(.gnu.linkonce.t.*)
+                *(.plt)
 		. = ALIGN(16);
 	}
 	_etext = .;

+ 1 - 0
gnuefi/elf_x86_64_efi.lds

@@ -19,6 +19,7 @@ SECTIONS
    *(.text)
    *(.text.*)
    *(.gnu.linkonce.t.*)
+   *(.plt)
    . = ALIGN(16);
   }
   _etext = .;