WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] A question related with symbol reference?

To: Zang Hongyong <zanghongyong@xxxxxxxxxx>, "fanghaifeng@xxxxxxxxxx" <fanghaifeng@xxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] A question related with symbol reference?
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Tue, 18 Mar 2008 08:31:25 +0000
Delivery-date: Tue, 18 Mar 2008 01:32:32 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20080318055957.E984013692B@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AciI0nP0ssC+dvTFEdytogAWy6hiGQ==
Thread-topic: [Xen-devel] A question related with symbol reference?
User-agent: Microsoft-Entourage/11.3.6.070618
Assembly code does not need a function prototype or indeed any label
declaration to be able to reference that function/label.

 -- Keir

On 18/3/08 06:19, "Zang Hongyong" <zanghongyong@xxxxxxxxxx> wrote:

> anyone can help?  
> I'm confused too.
> 
> ======== 2008-03-18 14:04:50 您在来信中写道: ========
> 
> hi, my friends:
> 
> recently, i am reading the source codes about hypercall.
> 
> First, i study a simple hypercall, for example, the "do_xen_version".
> 
> In "xen-3.1.0-src\xen\common\kernel.c", the definition of "do_xen_version" is:
> 
> DO(xen_version) (int cmd, XEN_GUEST_HANDLE(void) arg)
> {
> ....
> }
> 
> according to the " #define DO(fn) long do_##fn ", the expanded form is
> "do_xen_version (...)".
> 
> then, in the "xen-3.1.0-src\xen\arch\x86\x86_32\entry.S", there is an item in
> the "hypercall_table", like this:
> 
> ENTRY(hypercall_table)
> ....
> .long do_xen_version
> ....
> 
> 
> as we all known, for a symbol reference of function there need to be a header
> file contained, or a "global" declaration.
> 
> By searching the header files, i found the file,
> "xen-3.1.0-src\xen\include\xen\hypercall.h" that declared the function in a
> form as follows:
> 
> extern long
> do_xen_version(
> int cmd,
> XEN_GUEST_HANDLE(void) arg);
> 
> But, i can not find where the file "hypercall.h" is contained in order to link
> it with the reference of "do_xen_version" in the "entry.S"
> 
> So, please help me, or give me some advice.
> 
> thanks advance.
> 
> 2008-03-18 
> 
> 
> 
> 房海峰 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



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