public inbox for prelink@sourceware.org
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: prelink@sourceware.org
Subject: Re: Do not crash on corrupt symbol tables
Date: Fri, 16 May 2008 18:31:00 -0000	[thread overview]
Message-ID: <20080516183033.GA26988@caradoc.them.org> (raw)
In-Reply-To: <20071204161425.GA8129@caradoc.them.org>

On Tue, Dec 04, 2007 at 11:14:25AM -0500, Daniel Jacobowitz wrote:
> I have a library with a very corrupt symbol table.  It kills the
> prelinker, because some sections have not yet been moved in dso->scn
> when we go to close the corrupt file, so it tries to free some mmapped
> pointers.  This patch lets everything else in the filesystem be
> prelinked normally.

Ping?

> 2007-12-04  Daniel Jacobowitz  <dan@codesourcery.com>
> 
> 	* dso.c (reopen_dso): Update dso->scn and dso->shdr before
> 	adjusting sections.
> 
> ---
>  src/dso.c |    4 ++++
>  1 files changed, 4 insertions(+)
> 
> Index: prelink-20061211/src/dso.c
> ===================================================================
> --- prelink-20061211.orig/src/dso.c	2007-12-04 07:36:25.000000000 -0800
> +++ prelink-20061211/src/dso.c	2007-12-04 08:05:40.000000000 -0800
> @@ -936,6 +936,10 @@ reopen_dso (DSO *dso, struct section_mov
>      {
>        dso->scn[i] = elf_getscn (dso->elf, i);
>        gelfx_getshdr (dso->elf, dso->scn[i], dso->shdr + i);
> +    }
> +
> +  for (i = 1; i < move->new_shnum; i++)
> +    {
>        if (move->new_to_old[i] == -1)
>  	continue;
>        if (dso->move
> 

-- 
Daniel Jacobowitz
CodeSourcery

      reply	other threads:[~2008-05-16 18:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-04 16:14 Daniel Jacobowitz
2008-05-16 18:31 ` Daniel Jacobowitz [this message]

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=20080516183033.GA26988@caradoc.them.org \
    --to=drow@false.org \
    --cc=prelink@sourceware.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).