From: Jan Beulich <jbeulich@suse.com>
To: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
"Wei Liu" <wl@xen.org>, "Roger Pau Monné" <roger.pau@citrix.com>
Subject: [PATCH] x86/EFI: correct section offsets in mkreloc diagnostics
Date: Thu, 30 Apr 2020 12:24:57 +0200 [thread overview]
Message-ID: <5708d246-694a-424f-0998-261f26ccd118@suse.com> (raw)
These are more helpful if they point at the address where the relocated
value starts, rather than at the specific byte of the difference.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/arch/x86/efi/mkreloc.c
+++ b/xen/arch/x86/efi/mkreloc.c
@@ -238,7 +238,7 @@ static void diff_sections(const unsigned
fprintf(stderr,
"Difference at %.8s:%08" PRIxFAST32 " is %#" PRIxFAST64
" (expected %#" PRIxFAST64 ")\n",
- sec->name, i, delta, diff);
+ sec->name, i - disp, delta, diff);
continue;
}
if ( width == 8 && (val1.u64 < base || val1.u64 > end) )
@@ -263,14 +263,14 @@ static void diff_sections(const unsigned
{
fprintf(stderr,
"Cannot handle decreasing RVA (at %.8s:%08" PRIxFAST32 ")\n",
- sec->name, i);
+ sec->name, i - disp);
exit(3);
}
if ( !(sec->flags & COFF_SECTION_WRITEABLE) )
fprintf(stderr,
"Warning: relocation to r/o section %.8s:%08" PRIxFAST32 "\n",
- sec->name, i);
+ sec->name, i - disp);
printf("\t.word (%u << 12) | 0x%03" PRIxFAST32 "\n",
reloc, sec->rva + i - disp - rva);
next reply other threads:[~2020-04-30 10:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-30 10:24 Jan Beulich [this message]
2020-04-30 13:36 ` [PATCH] x86/EFI: correct section offsets in mkreloc diagnostics Andrew Cooper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5708d246-694a-424f-0998-261f26ccd118@suse.com \
--to=jbeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=roger.pau@citrix.com \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.