Expand the warning message about relocations generated against read-only
sections, so it also contains the linear address of the offending
relocation, like:

Warning: relocation to r/o section .text:00000048 @ 0xffff82d040200048

Signed-off-by: Roger Pau Monné <roger....@citrix.com>
---
 xen/arch/x86/efi/mkreloc.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/efi/mkreloc.c b/xen/arch/x86/efi/mkreloc.c
index cc106bd875ba..fa50314ae945 100644
--- a/xen/arch/x86/efi/mkreloc.c
+++ b/xen/arch/x86/efi/mkreloc.c
@@ -270,8 +270,9 @@ static void diff_sections(const unsigned char *ptr1, const 
unsigned char *ptr2,
 
         if ( !(sec->flags & IMAGE_SCN_MEM_WRITE) )
             fprintf(stderr,
-                    "Warning: relocation to r/o section %s:%08" PRIxFAST32 
"\n",
-                    get_name(sec->name), i - disp);
+                    "Warning: relocation to r/o section %s:%08" PRIxFAST32 " @ 
%p\n",
+                    get_name(sec->name), i - disp,
+                    (void *)(base + sec->rva + i - disp));
 
         printf("\t.word (%u << 12) | 0x%03" PRIxFAST32 "\n",
                reloc, sec->rva + i - disp - rva);
-- 
2.48.1


Reply via email to