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