mailing list of musl libc
 help / color / mirror / code / Atom feed
From: musl <b.brezillon.musl@gmail.com>
To: musl@lists.openwall.com
Subject: Re: ldso : dladdr support
Date: Fri, 24 Aug 2012 09:29:29 +0200	[thread overview]
Message-ID: <50372D59.7090604@gmail.com> (raw)
In-Reply-To: <20120823222113.GT27715@brightrain.aerifal.cx>

On 24/08/2012 00:21, Rich Felker wrote:
> On Thu, Aug 23, 2012 at 05:39:37PM -0400, Rich Felker wrote:
>> On Mon, Aug 20, 2012 at 04:32:00PM +0200, musl wrote:
>>> I missed a bug in my previous patch :
>>> in find_sym func precomptab was always set to sysv_precomp.
>> It's still broken; h is being used in the comparisons even if h was
>> not initialized, rather than using gh. I'm working on integrating the
>> code right now. I'll either commit my version or reply with a patch
>> here soon for review.
> Here's my proposed patch for gnu hash support. I've left dladdr to be
> committed separately. I handled the precomputed hashes by duplicating
> the code in the two branches; this is _ugly_ but it's moderately
> faster, and I really don't like the performance impact of these checks
> to begin with, so I'd rather not make them even worse.
>
> Some other changes I've made since Boris's last version:
>
> - Prefer GNU hash if it's available. It's a lot faster even in single
>   runs, and should make even more difference when data-locality issues
>   come into play (resolving whole files rather than just a single
>   dlsym call).
>
> - Omit bloom filter checks. It's not clear if they're beneficial on
>   average in large programs, but for single lookups where the symbol
>   is present, they increase lookup time by about 8%.
>
> - Replace the over-complicated decode_vec2 with search_vec, since we
>   only need a single extended entry anyway. In any case, the big-O
>   performance of high-entry lookups will always be the same as this
>   linear search unless we use heavy data structures, so we might as
>   well just do it this super-simple way.
>
> Comments welcome. I'll hold off on committing for a while in case I
> made any dumb mistakes.
I tested it and it works well.
My tests are based on small libs (with a small set of shared symbols).
I mixed libs with gnu hash and sysv hash.
Tried to resolve symbols via dlsym.

Have you tested it on big libraries ?
Do you want me to do some specific tests ?
> Rich



  reply	other threads:[~2012-08-24  7:29 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-07  9:04 musl
2012-08-07 11:46 ` Szabolcs Nagy
2012-08-07 14:15   ` musl
2012-08-07 14:53     ` Szabolcs Nagy
2012-08-07 23:09     ` Rich Felker
2012-08-08  9:55       ` musl
2012-08-08 11:52         ` Szabolcs Nagy
2012-08-08 12:54           ` Rich Felker
2012-08-08 13:57           ` musl
2012-08-11 23:05             ` Rich Felker
2012-08-15 22:41               ` boris brezillon
2012-08-17  5:39                 ` Rich Felker
2012-08-19 16:42                   ` musl
2012-08-20  2:06                     ` Rich Felker
2012-08-20 12:55                       ` musl
2012-08-20 14:32                         ` musl
2012-08-23 21:39                           ` Rich Felker
2012-08-23 22:21                             ` Rich Felker
2012-08-24  7:29                               ` musl [this message]
2012-08-24 18:38                                 ` Rich Felker
2012-08-25  7:42                                   ` boris brezillon
2012-08-25 12:35                                     ` Rich Felker
2012-08-25 22:13                                   ` musl
2012-08-25 22:37                                     ` musl
2012-08-26  0:00                                   ` musl
2012-08-24  8:12                               ` Szabolcs Nagy
2012-08-24  8:56                                 ` musl
2012-08-24  9:38                                   ` Szabolcs Nagy
2012-08-25 21:34                               ` musl
2012-08-25 21:42                                 ` Rich Felker
2012-08-16 18:03               ` musl
2012-08-17 16:35               ` musl
2012-08-08 12:49         ` Rich Felker

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=50372D59.7090604@gmail.com \
    --to=b.brezillon.musl@gmail.com \
    --cc=musl@lists.openwall.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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).