Hi Konrad,
On 07/04/16 04:49, Konrad Rzeszutek Wilk wrote:
This patch enables the Elf to be built with the build-id
and provide in the Xen hypervisor the code to extract it.
One can also retrieve the value of the build-id by doing
'readelf -n xen-syms'.
For EFI builds we re-use the same build-id that the xen-syms
was built with.
The version of ld that first implemented --build-id is v2.18.
We check for to see if the linker supports the --build-id
parameter and if so use it.
For x86 we have two binaries - the xen-syms and the xen - an
smaller version with lots of sections removed. To make it possible
for readelf -n xen we also modify mkelf32 and xen.lds.S to include
the PT_NOTE ELF section.
The EFI binary is more complicated. Having any non-recognizable
sections (.note, .data.note, etc) causes the boot to hang.
Moving the .note in the .data section makes it work. It is also
worth noting that the PE/COFF does not have any "comment"
sections to the author.
Lastly, we MUST call --binary-id=sha1 on all linker invocation so that
symbol offsets don't changes (which means we have multiple binary
ids - except that the last one is the final one). Without this change,
the symbol table embedded in Xen are incorrect - some of the values it
contains are offset by the size of the included build id.
This obviously causes problems when resolving symbols.
Suggested-by: Andrew Cooper <andrew.coop...@citrix.com>
Signed-off-by: Martin Pohlack <mpohl...@amazon.de>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.w...@oracle.com>
For the ARM bits:
Acked-by: Julien Grall <julien.gr...@arm.com>
Regards,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel