[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] ELF Notes for kernel image



Hi all,

For my undergraduate project, I am developing a simple
paravirtualized x64 Xen unikernel. I've been hitting some issues
that I hope you can help me with!

I'm trying to figure out how to equip an ELF binary with an ELF note
that marks it as a valid Xen image. I've found the following
resources:

http://wiki.xenproject.org/wiki/X86_Paravirtualised_Memory_Management#Start_Of_Day
http://www.netbsd.org/docs/kernel/elf-notes.html#note-creation
http://xenbits.xen.org/docs/4.3-testing/hypercall/include,public,elfnote.h.html

Unfortunately, they are quite hard to decipher! I've tried to
summarize what little information I've extracted. Can you please
verify that the following is accurate, and maybe help me fill in the
blanks or point me to additional resources?

* A "PT_NOTE section" is any ELF header section which conforms to
the PT_NOTE specification. It is typically named ".note.*" and
marked allocatable.
* A PT_NOTE section is a series of "notes", or key-value pairs, each
formatted as `key_size: int32, value_size: int32, value_type: int32,
key: (int32|int64|asciz), value: (int32|int64|asciz)`.
* The Xen PT_NOTE section is named ".note.Xen", and its keys are
listen (in order) in $XEN_ROOT/xen/include/public/elfnote.h.

My questions:
* Every PT_NOTE entry contains a type field. What does it do, and
how do I decide what goes in it?
* In particular, what are the types of the various entries in the
Xen PT_NOTES (as seen in elfnote.h)?
* After all of this is done, how can I verify that my compiled
binary indeed has a valid PT_NOTE entry for Xen? Does `readelf` have
a switch that's particularly appropriate for this?

Thanks in advance,

Carl Patenaude Poulin
B Eng Software Engineering undergrad
McGill University

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.