All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][ELF] Correct space calculation for symtab when BSD_SYMTAB=yes
@ 2007-08-02  8:03 Christoph Egger
  2007-08-02  8:49 ` Keir Fraser
  0 siblings, 1 reply; 5+ messages in thread
From: Christoph Egger @ 2007-08-02  8:03 UTC (permalink / raw)
  To: xen-devel; +Cc: Keir Fraser

[-- Attachment #1: Type: text/plain, Size: 892 bytes --]


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 <Christoph.Egger@amd.com>

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?


-- 
AMD Saxony, Dresden, Germany
Operating System Research Center

Legal Information:
AMD Saxony Limited Liability Company & Co. KG
Sitz (Geschäftsanschrift):
   Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland
Registergericht Dresden: HRA 4896
vertretungsberechtigter Komplementär:
   AMD Saxony LLC (Sitz Wilmington, Delaware, USA)
Geschäftsführer der AMD Saxony LLC:
   Dr. Hans-R. Deppe, Thomas McCoy

[-- Attachment #2: xen_symtab.diff --]
[-- Type: text/x-diff, Size: 1106 bytes --]

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);

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-08-02 16:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-02  8:03 [PATCH][ELF] Correct space calculation for symtab when BSD_SYMTAB=yes Christoph Egger
2007-08-02  8:49 ` Keir Fraser
2007-08-02 12:26   ` Christoph Egger
2007-08-02 13:21     ` Keir Fraser
2007-08-02 16:52       ` Christoph Egger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.