Blame SOURCES/0430-util-mkimage-Remove-unused-code-to-add-BSS-section.patch

b1bcb2
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
b1bcb2
From: Javier Martinez Canillas <javierm@redhat.com>
b1bcb2
Date: Thu, 11 Feb 2021 17:06:49 +0100
b1bcb2
Subject: [PATCH] util/mkimage: Remove unused code to add BSS section
b1bcb2
b1bcb2
The code is compiled out so there is no reason to keep it.
b1bcb2
b1bcb2
Additionally, don't set bss_size field since we do not add a BSS section.
b1bcb2
b1bcb2
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
b1bcb2
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
b1bcb2
---
b1bcb2
 util/mkimage.c | 17 -----------------
b1bcb2
 1 file changed, 17 deletions(-)
b1bcb2
b1bcb2
diff --git a/util/mkimage.c b/util/mkimage.c
b1bcb2
index e6b799fd73c..55bfd1d8b9e 100644
b1bcb2
--- a/util/mkimage.c
b1bcb2
+++ b/util/mkimage.c
b1bcb2
@@ -1460,7 +1460,6 @@ grub_install_generate_image (const char *dir, const char *prefix,
b1bcb2
 	    o->code_size = grub_host_to_target32 (exec_size);
b1bcb2
 	    o->data_size = grub_cpu_to_le32 (reloc_addr - exec_size
b1bcb2
 					     - header_size);
b1bcb2
-	    o->bss_size = grub_cpu_to_le32 (bss_size);
b1bcb2
 	    o->entry_addr = grub_cpu_to_le32 (start_address);
b1bcb2
 	    o->code_base = grub_cpu_to_le32 (header_size);
b1bcb2
 
b1bcb2
@@ -1498,7 +1497,6 @@ grub_install_generate_image (const char *dir, const char *prefix,
b1bcb2
 	    o->code_size = grub_host_to_target32 (exec_size);
b1bcb2
 	    o->data_size = grub_cpu_to_le32 (reloc_addr - exec_size
b1bcb2
 					     - header_size);
b1bcb2
-	    o->bss_size = grub_cpu_to_le32 (bss_size);
b1bcb2
 	    o->entry_addr = grub_cpu_to_le32 (start_address);
b1bcb2
 	    o->code_base = grub_cpu_to_le32 (header_size);
b1bcb2
 	    o->image_base = 0;
b1bcb2
@@ -1543,21 +1541,6 @@ grub_install_generate_image (const char *dir, const char *prefix,
b1bcb2
 	  = grub_cpu_to_le32_compile_time (GRUB_PE32_SCN_CNT_INITIALIZED_DATA
b1bcb2
 			      | GRUB_PE32_SCN_MEM_READ
b1bcb2
 			      | GRUB_PE32_SCN_MEM_WRITE);
b1bcb2
-
b1bcb2
-#if 0
b1bcb2
-	bss_section = data_section + 1;
b1bcb2
-	strcpy (bss_section->name, ".bss");
b1bcb2
-	bss_section->virtual_size = grub_cpu_to_le32 (bss_size);
b1bcb2
-	bss_section->virtual_address = grub_cpu_to_le32 (header_size + kernel_size);
b1bcb2
-	bss_section->raw_data_size = 0;
b1bcb2
-	bss_section->raw_data_offset = 0;
b1bcb2
-	bss_section->characteristics
b1bcb2
-	  = grub_cpu_to_le32_compile_time (GRUB_PE32_SCN_MEM_READ
b1bcb2
-			      | GRUB_PE32_SCN_MEM_WRITE
b1bcb2
-			      | GRUB_PE32_SCN_ALIGN_64BYTES
b1bcb2
-			      | GRUB_PE32_SCN_CNT_INITIALIZED_DATA
b1bcb2
-			      | 0x80);
b1bcb2
-#endif
b1bcb2
     
b1bcb2
 	mods_section = data_section + 1;
b1bcb2
 	strcpy (mods_section->name, "mods");