mailing list of musl libc
 help / color / mirror / code / Atom feed
From: idunham@lavabit.com
To: musl@lists.openwall.com
Subject: Re: Building without -Wl,-Bsymbolic-functions
Date: Sat, 18 Aug 2012 12:07:34 -0400 (EDT)	[thread overview]
Message-ID: <2774.50.0.229.11.1345306054.squirrel@lavabit.com> (raw)
In-Reply-To: <20120818121418.GX27715@brightrain.aerifal.cx>

> On Sat, Aug 18, 2012 at 01:38:23PM +0200, Jens wrote:
>>
>> Hi!
>>
>> Im building musl inside an oldish uclibc environment based on uclibc
>> 0.9.30.1, gcc 4.1.2 and GNU ld version 2.17.
>>
>> The linker does not accept -Bsymbolic-functions.
>>
>> Im now building the shared library despite of this.
>>
>> How broken will the musl libc be without -Bsymbolic-functions ?
>
> If building without it entirely, the shared libc will just crash.
>
> If replacing it with -Bsymbolic, it will run, but global variables in
> libc that are accessed by the application (e.g. environ, optind, ...)
> will actually have separate copies in libc and the application, and
> thus the app won't work as expected.
Last I checked, ISTR it was "Illegal instruction" or segfault (even for
hello world); I forget which was which, but both did not work at all.

> A patch to add -Bsymbolic-functions to old binutils would be very
> welcome... In the mean time, you could compile a new ld and pass the
> -B option to gcc to give it the path for the new ld.
The patch isn't trivial to get right, but 2.17.50 (20070703) is a
significant improvement in many other ways (a few code generation fixes
among them)...
I've built a tarball, but not really posted it publicly (tarballs in git
is really nasty 8-)* ).

Interestingly, -B is not needed if you just put the desired version first
in your path. (I found that out trying 2.17/2.17.50 on an Ubuntu host
Isaac Dunham

*see github.com/idunham/srcs if you still dare.




  reply	other threads:[~2012-08-18 16:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-18 11:38 Jens
2012-08-18 12:14 ` Rich Felker
2012-08-18 16:07   ` idunham [this message]
2012-08-18 19:40     ` Rich Felker
2012-08-19  6:11   ` Jens

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=2774.50.0.229.11.1345306054.squirrel@lavabit.com \
    --to=idunham@lavabit.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).