From e7c418c58ff1bbc5c11f2559a8d25939ae32d6aa Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Sun, 15 Dec 2013 14:18:30 +0100 Subject: [PATCH] * util/grub-mkimagexx.c (relocate_addresses): Display offset rather than almost useless pointer. --- ChangeLog | 5 +++++ util/grub-mkimagexx.c | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f27d30482..db0f37883 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-12-15 Vladimir Serbinenko + + * util/grub-mkimagexx.c (relocate_addresses): Display offset rather + than almost useless pointer. + 2013-12-15 Vladimir Serbinenko Add gcc_struct to all packed structures when compiling with mingw. diff --git a/util/grub-mkimagexx.c b/util/grub-mkimagexx.c index b7c01ab1a..d6feffd2a 100644 --- a/util/grub-mkimagexx.c +++ b/util/grub-mkimagexx.c @@ -855,7 +855,10 @@ SUFFIX (relocate_addresses) (Elf_Ehdr *e, Elf_Shdr *sections, case R_ARM_THM_JUMP19: { grub_err_t err; - grub_util_info (" THM_JUMP24:\ttarget=0x%08lx\toffset=(0x%08x)", (unsigned long) target, sym_addr); + grub_util_info (" THM_JUMP24:\ttarget=0x%08lx\toffset=(0x%08x)", + (unsigned long) ((char *) target + - (char *) e), + sym_addr); if (!(sym_addr & 1)) { grub_uint32_t tr_addr; @@ -888,7 +891,7 @@ SUFFIX (relocate_addresses) (Elf_Ehdr *e, Elf_Shdr *sections, case R_ARM_JUMP24: { grub_err_t err; - grub_util_info (" JUMP24:\ttarget=0x%08lx\toffset=(0x%08x)", (unsigned long) target, sym_addr); + grub_util_info (" JUMP24:\ttarget=0x%08lx\toffset=(0x%08x)", (unsigned long) ((char *) target - (char *) e), sym_addr); if (sym_addr & 1) { grub_uint32_t tr_addr;