From: Keir Fraser <keir@xensource.com>
To: Christoph Egger <Christoph.Egger@amd.com>, xen-devel@lists.xensource.com
Subject: Re: [PATCH][ELF] Correct space calculation for symtab when BSD_SYMTAB=yes
Date: Thu, 02 Aug 2007 09:49:57 +0100 [thread overview]
Message-ID: <C2D75945.1376E%keir@xensource.com> (raw)
In-Reply-To: <200708021003.54137.Christoph.Egger@amd.com>
On 2/8/07 09:03, "Christoph Egger" <Christoph.Egger@amd.com> wrote:
> If there is a string table for section headers, it also gets loaded.
> Therefore take it into account in size calculation for kernel symtab.
I don't see how this works. In fact the whole sstart,send calculation looks
broken. What do the virtual addresses of the symtab/strtab sections have to
do with their location in the final address space, after loading? And since
you pack the sections into the domain address space in
elf_xen_dom_load_binary(), should you not simply sum the sizes of the
sections, then sstart=virt_kend and send=sstart+size_sum, rather than taking
max(end addresses in elf image) minus min(start addresses in elf image).
Does the section-header string table have to be loaded, or is that just an
artefact of the loader code scanning for all SYMTAB/STRTAB? Shouldn't the
loader fix up e_shnum and symtab's sh_link in the Elf metadata that it
generates? Couldn't the loader just use the saved elf->sym_tab and
elf->sym_strtab to directly find the interesting two sections, rather than
needing to do yet another full scan?
> 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?
I don't think so!
-- Keir
next prev parent reply other threads:[~2007-08-02 8:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2007-08-02 12:26 ` Christoph Egger
2007-08-02 13:21 ` Keir Fraser
2007-08-02 16:52 ` Christoph Egger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C2D75945.1376E%keir@xensource.com \
--to=keir@xensource.com \
--cc=Christoph.Egger@amd.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.