mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: building musl libc.so with gcc -flto
Date: Tue, 28 Apr 2015 09:44:53 -0400	[thread overview]
Message-ID: <20150428134453.GM17573@brightrain.aerifal.cx> (raw)
In-Reply-To: <CAJ86T=XWVqR9Ht0GRbMVv=nRd=p1rMN15o-cHQQt7x11-RYkgQ@mail.gmail.com>

On Mon, Apr 27, 2015 at 11:23:40PM -0700, Andre McCurdy wrote:
> On Mon, Apr 27, 2015 at 5:24 PM, Rich Felker <dalias@libc.org> wrote:
> > On Mon, Apr 27, 2015 at 05:16:12PM -0700, Andre McCurdy wrote:
> >> > OK, it looks like the _dlstart_c symbol got removed before linking the
> >> > asm. What about selectively compiling this file with -fno-lto via
> >> > something like this in config.mak:
> >> >
> >> > src/ldso/dlstart.lo: CFLAGS += -fno-lto
> >>
> >> That works. Should I send a patch?
> >
> > Yes, but configure would need to detect support for -fno-lto and add
> > it appropriately. See what's done for CFLAGS_NOSSP. I suspect the crt
> > files also need -fno-lto in principle even if they're not currently
> > breaking for lack of it.
> 
> Patch sent.
> 
> I think the crt files might be OK as they are, since the _start_c
> symbol isn't being hidden?

I think you'll find the exact same thing happens if you use a crt1.o
produced from crt1.c for static linking with LTO. Note that on i386
(and x86_64) we still have a crt1.s which overrides crt1.c; I want to
remove it at some point. Temporarily removing/renaming it yourself
will allow you to test what happens with LTO on this file.

Rich


  reply	other threads:[~2015-04-28 13:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-22 22:48 Andre McCurdy
2015-04-23  2:23 ` Rich Felker
2015-04-23  5:34   ` Andre McCurdy
2015-04-23  9:45     ` Rich Felker
2015-04-28  0:16       ` Andre McCurdy
2015-04-28  0:24         ` Rich Felker
2015-04-28  6:23           ` Andre McCurdy
2015-04-28 13:44             ` Rich Felker [this message]
2015-04-29  1:42               ` Andre McCurdy
2015-04-29  3:27                 ` Rich Felker
2015-05-01  5:48                   ` Andre McCurdy
2015-05-01 10:10                     ` Szabolcs Nagy
2015-05-01 15:49                       ` Rich Felker
2015-04-30 20:46   ` Andy Lutomirski
2015-04-30 23:44     ` Rich Felker
2015-05-01  6:57       ` Alexander Monakov

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=20150428134453.GM17573@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).