From: Daniel Jacobowitz <drow@false.org>
To: Jakub Jelinek <jakub@redhat.com>
Cc: binutils@sources.redhat.com
Subject: Re: [RFC PATCH] Don't put local or undefined symbols into .hash
Date: Mon, 26 Jun 2006 13:10:00 -0000 [thread overview]
Message-ID: <20060626130211.GA28007@nevyn.them.org> (raw)
In-Reply-To: <20060626123238.GU3823@sunsite.mff.cuni.cz>
On Mon, Jun 26, 2006 at 02:32:38PM +0200, Jakub Jelinek wrote:
> Hi!
>
> It seems an average shared library has roughly 25% of undefined symbols
> in its .dynsym section.
> Currently, the linker puts all dynamic symbols (except the special ones like
> section symbols or symbol 0) into the .hash section, but the dynamic linker
> will always skip STB_LOCAL symbols or undefined symbols (except those with
> st_value != 0) - it is always looking for symbol definitions.
> Is there any reason why we put even the undefined or local symbols into
> .hash? It just makes the .hash buckets array larger and/or the hash chains
> longer than necessary.
> Or is there something that relies on all symbols being there?
> So far I have noticed just readelf -Ds (but in that case it is questionable
> if readelf -Ds would need to change or stay as is).
Regardless of whether any other software would break, please don't let
readelf -Ds just ignore the undefined symbols. If you want to leave
them out of the hash table, maybe readelf -Ds should make a second pass
to dump out things from .dynsym which weren't in the hash.
I often use this to work out a library's dependencies.
--
Daniel Jacobowitz
CodeSourcery
prev parent reply other threads:[~2006-06-26 13:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-26 13:02 Jakub Jelinek
2006-06-26 13:10 ` 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=20060626130211.GA28007@nevyn.them.org \
--to=drow@false.org \
--cc=binutils@sources.redhat.com \
--cc=jakub@redhat.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 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).