From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Christoph Egger" Subject: [PATCH][ELF] Correct space calculation for symtab when BSD_SYMTAB=yes Date: Thu, 2 Aug 2007 10:03:53 +0200 Message-ID: <200708021003.54137.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_q/YsGuk3SYPzso+" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Keir Fraser List-Id: xen-devel@lists.xenproject.org --Boundary-00=_q/YsGuk3SYPzso+ Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi! If there is a string table for section headers, it also gets loaded. Therefore take it into account in size calculation for kernel symtab. Also there is no need to call elf_set_verbose() a second time after elf_init() (First call happens within elf_init()). Signed-off-by: Christoph Egger Keir: Can you also apply changeset 15672 and this patch to Xen 3.1-stable, since these fixes an regression for Xen 3.1, please? =2D-=20 AMD Saxony, Dresden, Germany Operating System Research Center Legal Information: AMD Saxony Limited Liability Company & Co. KG Sitz (Gesch=E4ftsanschrift): Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland Registergericht Dresden: HRA 4896 vertretungsberechtigter Komplement=E4r: AMD Saxony LLC (Sitz Wilmington, Delaware, USA) Gesch=E4ftsf=FChrer der AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy --Boundary-00=_q/YsGuk3SYPzso+ Content-Type: text/x-diff; charset=us-ascii; name=xen_symtab.diff Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=xen_symtab.diff diff -r 88bb0d305308 xen/arch/x86/domain_build.c --- a/xen/arch/x86/domain_build.c Wed Aug 01 15:47:54 2007 +0100 +++ b/xen/arch/x86/domain_build.c Thu Aug 02 09:31:58 2007 +0200 @@ -268,9 +268,6 @@ int __init construct_dom0( if ( (rc = elf_init(&elf, image_start, image_len)) != 0 ) return rc; -#ifdef VERBOSE - elf_set_verbose(&elf); -#endif elf_parse_binary(&elf); if ( (rc = elf_xen_parse(&elf, &parms)) != 0 ) return rc; diff -r 88bb0d305308 xen/common/libelf/libelf-loader.c --- a/xen/common/libelf/libelf-loader.c Wed Aug 01 15:47:54 2007 +0100 +++ b/xen/common/libelf/libelf-loader.c Thu Aug 02 09:30:52 2007 +0200 @@ -53,8 +53,10 @@ int elf_init(struct elf_binary *elf, con /* Find section string table. */ section = elf_uval(elf, elf->ehdr, e_shstrndx); shdr = elf_shdr_by_index(elf, section); - if ( shdr != NULL ) + if ( shdr != NULL ) { elf->sec_strtab = elf_section_start(elf, shdr); + high = low = (unsigned long)shdr; + } /* Find symbol table and symbol string table. */ count = elf_shdr_count(elf); --Boundary-00=_q/YsGuk3SYPzso+ Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_q/YsGuk3SYPzso+--