mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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:a353cab905("build_id: Provide ld-embedded build-ids") Reported-by: Barr Detwix <timotheecisnard@gmail.com> Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com> master commit:19d3c4825dmaster date: 2026-09-28 14:27:11 +0200
This commit is contained in:
1 parent
b3b2fce742
commit
b3bf1a021b
1 file changed
+1
-1
@@ -360,7 +360,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 )
|
||||
|
||||