Support creating ELF note segments in the kernel ELF image.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 7 lines · Xen staging patchbot-unstable
# HG changeset patch
# User Ian Campbell <[email protected]>
# Date 1156245643 -3600
# Node IDa4550b7488400c44a9f27c92115c8e364493837a
# Parentcd4e7ace4e58d9e35c08ccaa4677c6b6d0cf137b[LINUX] Support creating ELF note segments in the kernel ELF image.
[snip]
Review OUTPUT_ARCH(i386) · line 18
Quoted 13 lines
diff -r
cd4e7ace4e58-ra4550b748840linux-2.6-xen-sparse/arch/i386/kernel/vmlinux.lds.S
---a/linux-2.6-xen-sparse/arch/i386/kernel/vmlinux.lds.STue Aug
22 11:34:46 2006 +0100
+++b/linux-2.6-xen-sparse/arch/i386/kernel/vmlinux.lds.STue Aug
22 12:20:43 2006 +0100(quoted diff) +4
-0@@ -12,6 +12,12 @@ OUTPUT_ARCH(i386) OUTPUT_ARCH(i386) ENTRY(phys_startup_32) jiffies = jiffies_64; + +PHDRS { + text PT_LOAD FLAGS(5); /* R_E */ + data PT_LOAD FLAGS(7); /* RWE */
Are you sure you want to explicitly create a data segment that was not there before?
Review OUTPUT_ARCH(i386) · line 19
Quoted 1 line
(quoted diff) +1
-0+ note PT_NOTE FLAGS(4); /* R__ */
FLAGS() should be zero. The NOTE segment(s) are usually for the ELF interpreter and not software accessible to the program.
If it is your intention for this to be accessible by your program then you need a symbolic reference to it and it probably should not be in a segment all on its own.
-JX
Quoted 19 lines · Jimi Xenidis
Quoted 7 lines · Xen staging patchbot-unstable
# HG changeset patch
# User Ian Campbell <[email protected]>
# Date 1156245643 -3600
# Node IDa4550b7488400c44a9f27c92115c8e364493837a
# Parentcd4e7ace4e58d9e35c08ccaa4677c6b6d0cf137b[LINUX] Support creating ELF note segments in the kernel ELF image.[snip]
Quoted 9 lines
diff -r
cd4e7ace4e58-ra4550b748840linux-2.6-xen-sparse/arch/i386/kernel/vmlinux.lds.S
---a/linux-2.6-xen-sparse/arch/i386/kernel/vmlinux.lds.STue Aug
22 11:34:46 2006 +0100
+++b/linux-2.6-xen-sparse/arch/i386/kernel/vmlinux.lds.STue Aug
22 12:20:43 2006 +0100(quoted diff) +0
-0@@ -12,6 +12,12 @@ OUTPUT_ARCH(i386) OUTPUT_ARCH(i386) ENTRY(phys_startup_32)
Quoted 8 lines
Review OUTPUT_ARCH(i386) · line 18
Quoted 5 lines
(quoted diff) +4
-0jiffies = jiffies_64; + +PHDRS { + text PT_LOAD FLAGS(5); /* R_E */ + data PT_LOAD FLAGS(7); /* RWE */Are you sure you want to explicitly create a data segment that was not there before?
I'm note 100% sure since this is a patch backported -mm but I think that may have been part of the intention.
Quoted 7 lines
Review OUTPUT_ARCH(i386) · line 19
Quoted 1 line
(quoted diff) +1
-0+ note PT_NOTE FLAGS(4); /* R__ */
FLAGS()should be zero. The NOTE segment(s) are usually for the ELF interpreter and not software accessible to the program. If it is your intention for this to be accessible by your program then you need a symbolic reference to it and it probably should not be in a segment all on its own.
We want to replace the __xen_guest string with a selection of ELF notes so these are for the use of the interpreter (i.e. the domain builder). I guess the flags is largely immaterial in this context but perhaps 0 would be a more sensible value, I'll mention it upstream...
BTW the reason for this is that the __xen_guest stuff was unpalatable for the upstream merge, plus the notes is a nicer interface anyway, IMHO...
Ian.