|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] x86/mkelf32: correct VA/PA of PT_NOTE / .note
commit 19d3c4825d338a5667f4f9286c58e86001452476
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Mon Sep 28 14:27:11 2026 +0200
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Sep 28 14:27:11 2026 +0200
x86/mkelf32: correct VA/PA of PT_NOTE / .note
For the .p_paddr, .p_vaddr, and .sh_addr fields the image load base
(passed in by command line argument) also needs taking into account. It is
_not_ merely the delta between incoming PT_NOTE and PT_LOAD segments. (The
fields aren't really used anywhere, so this is largely a cosmetic issue;
static analysis tools may be affected, though.)
Fixes: a353cab905af ("build_id: Provide ld-embedded build-ids")
Reported-by: Barr Detwix <timotheecisnard@xxxxxxxxx>
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
xen/arch/x86/boot/mkelf32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/x86/boot/mkelf32.c b/xen/arch/x86/boot/mkelf32.c
index ac5695c0e6..4f742a4e69 100644
--- a/xen/arch/x86/boot/mkelf32.c
+++ b/xen/arch/x86/boot/mkelf32.c
@@ -362,7 +362,7 @@ int main(int argc, char **argv)
(void)lseek(infd, offset, SEEK_SET);
note_sz = in64_phdr.p_memsz;
- note_base = in64_phdr.p_vaddr - note_base;
+ note_base = in64_phdr.p_vaddr - note_base + loadbase;
if ( in64_phdr.p_offset < offset ||
in64_phdr.p_offset + in64_phdr.p_filesz > offset + dat_siz )
--
generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |