Discussion:
[PATCH] multiboot_elfxx.c: fix compilation by fixing undeclared variable
Denis 'GNUtoo' Carikli
2018-06-29 12:15:11 UTC
Permalink
Without that fix we have:
In file included from ../../include/grub/command.h:25:0,
from ../../grub-core/loader/multiboot.c:30:
../../grub-core/loader/multiboot_elfxx.c: In function 'grub_multiboot_load_elf64':
../../grub-core/loader/multiboot_elfxx.c:130:28: error: 'relocatable' undeclared (first use in this function)
"load_base_addr=0x%x\n", relocatable,

Signed-off-by: Denis 'GNUtoo' Carikli <***@no-log.org>
---
grub-core/loader/multiboot_elfxx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/grub-core/loader/multiboot_elfxx.c b/grub-core/loader/multiboot_elfxx.c
index ae36d9d49..70cd1db51 100644
--- a/grub-core/loader/multiboot_elfxx.c
+++ b/grub-core/loader/multiboot_elfxx.c
@@ -127,7 +127,7 @@ CONCAT(grub_multiboot_load_elf, XX) (mbi_load_data_t *mld)
mld->load_base_addr = mld->link_base_addr;

grub_dprintf ("multiboot_loader", "relocatable=%d, link_base_addr=0x%x, "
- "load_base_addr=0x%x\n", relocatable,
+ "load_base_addr=0x%x\n", mld->relocatable,
mld->link_base_addr, mld->load_base_addr);

/* Load every loadable segment in memory. */
--
2.18.0
Continue reading on narkive:
Loading...