:: commit d454935ec65152f7cbe5e34983da2d0139d838b9

mintsuki <mintsuki@protonmail.com> — 2022-04-21 13:44

parents: 4e349fe000

efi: Update linker scripts for new reduced-gnu-efi

diff --git a/common/linker_uefi32.ld.in b/common/linker_uefi32.ld.in
index 863c3ad1..efb51fde 100644
--- a/common/linker_uefi32.ld.in
+++ b/common/linker_uefi32.ld.in
@@ -22,19 +22,25 @@ SECTIONS
 
         __text_start = .;
         __text_size = __text_end - __text_start;
+        __text_sizev = __text_endv - __text_start;
         *(.text .text.*)
+        __text_endv = .;
         . = ALIGN(0x1000);
         __text_end = .;
 
         __reloc_start = .;
         __reloc_size = __reloc_end - __reloc_start;
+        __reloc_sizev = __reloc_endv - __reloc_start;
         *(.reloc)
+        __reloc_endv = .;
         . = ALIGN(0x1000);
         __reloc_end = .;
 
         __sbat_start = .;
         __sbat_size = __sbat_end - __sbat_start;
+        __sbat_sizev = __sbat_endv - __sbat_start;
         *(.sbat)
+        __sbat_endv = .;
         . = ALIGN(0x1000);
         __sbat_end = .;
 
diff --git a/common/linker_uefi64.ld.in b/common/linker_uefi64.ld.in
index 36a6d5c3..ee520dec 100644
--- a/common/linker_uefi64.ld.in
+++ b/common/linker_uefi64.ld.in
@@ -22,19 +22,25 @@ SECTIONS
 
         __text_start = .;
         __text_size = __text_end - __text_start;
+        __text_sizev = __text_endv - __text_start;
         *(.text .text.*)
+        __text_endv = .;
         . = ALIGN(0x1000);
         __text_end = .;
 
         __reloc_start = .;
         __reloc_size = __reloc_end - __reloc_start;
+        __reloc_sizev = __reloc_endv - __reloc_start;
         *(.reloc)
+        __reloc_endv = .;
         . = ALIGN(0x1000);
         __reloc_end = .;
 
         __sbat_start = .;
         __sbat_size = __sbat_end - __sbat_start;
+        __sbat_sizev = __sbat_endv - __sbat_start;
         *(.sbat)
+        __sbat_endv = .;
         . = ALIGN(0x1000);
         __sbat_end = .;
 
tab: 248 wrap: offon