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

[Xen-devel] [patch] make ELF functions static

To: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Subject: [Xen-devel] [patch] make ELF functions static
From: Hollis Blanchard <hollisb@xxxxxxxxxx>
Date: Tue, 29 Aug 2006 16:15:32 -0500
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, xen-ppc-devel <xen-ppc-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 29 Aug 2006 14:15:28 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
Organization: IBM Linux Technology Center
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi Ian, these functions should be static. It would only be a style issue
except PowerPC actually #includes elf.c twice, to support both 32- and
64-bit ELF binaries. Please apply.


Make xen_elfnote_string() and xen_elfnote_numeric() static.
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>

--- a/xen/common/elf.c  Tue Aug 29 06:53:58 2006 -0400
+++ b/xen/common/elf.c  Tue Aug 29 15:52:40 2006 -0500
@@ -145,7 +145,7 @@ static Elf_Note *xen_elfnote_lookup(stru
     return NULL;
 }

-const char *xen_elfnote_string(struct domain_setup_info *dsi, int type)
+static const char *xen_elfnote_string(struct domain_setup_info *dsi, int type)
 {
     Elf_Note *note;

@@ -159,8 +159,8 @@ const char *xen_elfnote_string(struct do
     return (const char *)ELFNOTE_DESC(note);
 }

-unsigned long long xen_elfnote_numeric(struct domain_setup_info *dsi,
-                                       int type, int *defined)
+static unsigned long long xen_elfnote_numeric(struct domain_setup_info *dsi,
+  int type, int *defined)
 {
     Elf_Note *note;
 
--- a/xen/include/xen/elf.h     Tue Aug 29 06:53:58 2006 -0400
+++ b/xen/include/xen/elf.h     Tue Aug 29 16:06:08 2006 -0500
@@ -529,10 +529,6 @@ extern int loadelfimage(struct domain_se
 extern int loadelfimage(struct domain_setup_info *);
 extern int parseelfimage(struct domain_setup_info *);

-extern unsigned long long xen_elfnote_numeric(struct domain_setup_info *dsi,
-                                             int type, int *defined);
-extern const char *xen_elfnote_string(struct domain_setup_info *dsi, int 
type);-
 #ifdef Elf_Ehdr
 extern int elf_sanity_check(Elf_Ehdr *ehdr);
 #endif



-- 
Hollis Blanchard
IBM Linux Technology Center


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