mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: gcc'c crtstuff.c: a musl-related experience
Date: Sun, 15 Jun 2014 21:41:31 -0400	[thread overview]
Message-ID: <20140616014130.GT179@brightrain.aerifal.cx> (raw)
In-Reply-To: <539E11E5.2080004@midipix.org>

On Sun, Jun 15, 2014 at 05:36:37PM -0400, writeonce@midipix.org wrote:
> The two files at stake are gcc/linux.h, and libgcc/crtstuff.c.  In
> the former, a built-in macro named __gnu_linux__ is defined when
> glibc is the toolchain's default libc (OPTION_GLIBC).  In the
> latter, a macro named USE_PT_GNU_EH_FRAME is defined when
> __gnu_linux__ is defined, which accordingly prevents
> USE_EH_FRAME_REGISTRY from being defined shortly thereafter.  The
> absence of this last macro results in a crtbegin.o that is
> incompatible with musl, at least in some cases (a simple c++
> application crashes after an exception has been thrown, which is how
> I came to notice it).

I'm not an expert on gcc internals, but I'm doubtful of your
explanation of the problem. From just the macro names,
USE_PT_GNU_EH_FRAME is the one you want, and USE_EH_FRAME_REGISTRY
sounds like the nasty old fallback that's incompatible with static
linking of libgcc_eh.a.

However I'm confused what this has to do with crtbegin.o/crtend.o.
Perhaps someone who's worked with toolchain stuff could comment.

The reason I'm bringing this up is that there might really be some bug
in musl or in your toolchain setup, where switching to the old code is
just covering up the bug.

Rich


  reply	other threads:[~2014-06-16  1:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-15 21:36 writeonce
2014-06-16  1:41 ` Rich Felker [this message]
2014-06-16  4:37   ` 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=20140616014130.GT179@brightrain.aerifal.cx \
    --to=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).