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

Re: [Xen-devel] how to objdump xen to print its function?



On Wed, 2011-11-23 at 13:02 +0000, Baozeng wrote:
> Hello all,
> I want to see the assemble code of Xen. So I use make world and make
> install to generate xen-4.1.2.gz. and unzip it to be the ELF file
> xen-4.1.2. Then I use objdump tool to see the assemble code.
> I found xen has only one section .text. Then I wonder where is the
> section .data?

This file is actually a specially constructed thing to satisfy
multiboots requirements and not the "real" ELF file. You should use the
xen...-syms file instead. Either from the build tree or possibly
from /boot if it is installed.

> # objdump -h /boot/xen-4.1.2
> 
> /boot/xen-4.1.2:     file format elf32-i386
> 
> Sections:
> Idx Name          Size      VMA       LMA       File off  Algn
>   0 .text         0013d41c  00100000  00100000  00000080  2**6
>                   CONTENTS, ALLOC, LOAD, CODE
> 
> Another question: how do I know which assemble code in the ELF file
> corresponds to the source code line "dom0->is_privileged=1" in
> xen\arch\x86\setup.c file? In other words, how could I show the
> function name in the assemble code file? by adding -g option when
> making xen?

Add "debug=y" to your build line.

Ian.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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