26 lines
952 B
Diff
26 lines
952 B
Diff
|
# Commit f8f185dc4359a1cd8e7896dfbcacb54b473436c8
|
||
|
# Date 2016-09-02 14:18:52 +0200
|
||
|
# Author Jan Beulich <jbeulich@suse.com>
|
||
|
# Committer Jan Beulich <jbeulich@suse.com>
|
||
|
x86: correct PT_NOTE file position
|
||
|
|
||
|
Program and section headers disagreed about the file offset at which
|
||
|
the build ID note lives.
|
||
|
|
||
|
Reported-by: Sylvain Munaut <s.munaut@whatever-company.com>
|
||
|
Signed-off-by: Jan Beulich <jbeulich@suse.com>
|
||
|
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
||
|
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
|
||
|
|
||
|
--- a/xen/arch/x86/boot/mkelf32.c
|
||
|
+++ b/xen/arch/x86/boot/mkelf32.c
|
||
|
@@ -394,7 +394,7 @@ int main(int argc, char **argv)
|
||
|
note_phdr.p_paddr = note_base;
|
||
|
note_phdr.p_filesz = note_sz;
|
||
|
note_phdr.p_memsz = note_sz;
|
||
|
- note_phdr.p_offset = offset;
|
||
|
+ note_phdr.p_offset = RAW_OFFSET + offset;
|
||
|
|
||
|
/* Tack on the .note\0 */
|
||
|
out_shdr[2].sh_size += sizeof(out_shstrtab_extra);
|