mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Natanael Copa <ncopa@alpinelinux.org>
To: Rich Felker <dalias@libc.org>
Cc: musl@lists.openwall.com
Subject: Re: Question re: dynamic linking in musl
Date: Thu, 28 May 2015 16:03:34 +0200	[thread overview]
Message-ID: <20150528160334.3248c0c1@ncopa-desktop.alpinelinux.org> (raw)
In-Reply-To: <20150527140658.GK17573@brightrain.aerifal.cx>

On Wed, 27 May 2015 10:06:58 -0400
Rich Felker <dalias@libc.org> wrote:

> On Wed, May 27, 2015 at 04:23:26PM +0300, Timo Teras wrote:
> > On Wed, 27 May 2015 15:15:03 +0200
> > Alex Dowad <alexinbeijing@gmail.com> wrote:
> > 
> > > On 27/05/15 15:09, Timo Teras wrote:
> > > > On Wed, 27 May 2015 16:01:50 +0300 (MSK)
> > > > Alexander Monakov <amonakov@ispras.ru> wrote:
> > > >
> > > >> I'm not familiar with Alpine.  Hopefully someone else can chime in
> > > >> whether .gnu.hash is deliberately disabled.
> > > > We have not touched, so we are using the gcc default. Which
> > > > apparently then is sysv only (bummer).
> > >
> > > Yes, that callgrind profile was from a program installed from Alpine
> > > repos.
> > > 
> > > Use --hash-style=both in LD_FLAGS when building the APKs, and dynamic 
> > > linking will become much faster!
> > 
> > We want that in the toolchain. It's gcc configure option:
> >   --with-linker-hash-style={sysv,gnu,both}
> > 
> > I wonder if it should be 'gnu' or 'both'. Apparently 'both' will be
> > larger as then everything is hashed twice.
> > 
> > Is there any known issues if I just specify 'gnu' ?
> 
> In the sense of "known issues" I would say no, but I would still
> strongly discourage this. A valid dynamic ELF file requries the sysv
> (standard ELF) hash table; the original reason musl added support for
> GNU hash was for ABI-compat to be able to run binaries from distros
> that were producing "invalid" ELF files. :-) While musl fully supports
> either, and will perform considerably better when GNU hash is present
> once we get Alexander Monakov's improvements in, it's possible that
> some simple tools for processing ELF files, or programs which do
> various sorts of introspection via dl_iterate_phdr or otherwise, may
> expect the sysv hash table to be present and fail badly without it.

Seems like at least ubuntu has done gnu-only hash style last 5 years.
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/704691

-nc


  reply	other threads:[~2015-05-28 14:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-27 10:08 Alex Dowad
2015-05-27 10:40 ` Alexander Monakov
2015-05-27 11:18   ` Alex Dowad
2015-05-27 13:01     ` Alexander Monakov
2015-05-27 13:09       ` Timo Teras
2015-05-27 13:15         ` Alex Dowad
2015-05-27 13:23           ` Timo Teras
2015-05-27 14:06             ` Szabolcs Nagy
2015-05-27 14:06             ` Rich Felker
2015-05-28 14:03               ` Natanael Copa [this message]
2015-05-27 13:06     ` Szabolcs Nagy

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=20150528160334.3248c0c1@ncopa-desktop.alpinelinux.org \
    --to=ncopa@alpinelinux.org \
    --cc=dalias@libc.org \
    --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).