public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Diego Novillo <dnovillo@google.com>
Cc: Andi Kleen <andi@firstfloor.org>,
	gcc-patches@gcc.gnu.org,	Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH 1/3] Add native ELF and LTO support in collect2
Date: Tue, 02 Nov 2010 11:42:00 -0000	[thread overview]
Message-ID: <20101102114112.GC27428@basil.fritz.box> (raw)
In-Reply-To: <4CCFF04D.7060102@google.com>

> Hm, why not just force the use of a linker that has plugin support?

I mainly did it so that the constructors etc. would be still
generated by collect2. But maybe that could be fully done
by the linker now. I must admit I don't understand all 
the implications of such a change, so I preferred to keep
the old mode and just make it work with LTO symbol tables.

There's also two additional uses of this infrastructure
(which are not in this patchkit yet):

- Detect leftover non LTO code from earlier ld -r and use objcopy to copy
it to a new object file and include it. This can be easily done
with slim LTO.
The main use of that is handling .S files LTO build that uses ld -r.
Without it that code would disappear during LTO.
I need that for a project I'm interested in. This was the main
reason I implemented slim LTO in the first place.

- Automatic detection of LTO so that if a Makefile forgets 
to add the lto options for the final link it would still work.
This is actually needed for a full gcc lto slim bootstrap right
now because libiberty doesn't set correct stage2/3 link flags.

Perhaps that's obsolete, if ld plugin support is universal
the plugin could be just enabled unconditionally. I was a bit
wary of this before because it would mean unconditional gold
and gold still seems to have trouble with some code.

-Andi

  parent reply	other threads:[~2010-11-02 11:41 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-16 15:09 Updated slim-lto patchkit Andi Kleen
2010-10-16 16:07 ` [PATCH 1/3] Add native ELF and LTO support in collect2 Andi Kleen
2010-10-16 15:09   ` [PATCH 2/3] Implement -flto-slim Andi Kleen
2010-10-16 16:25     ` [PATCH 3/3] Add bootstrap-lto-slim build config Andi Kleen
2010-11-02 11:03     ` [PATCH 2/3] Implement -flto-slim Diego Novillo
2010-11-02 11:06       ` Richard Guenther
2010-11-02 11:18         ` Diego Novillo
2010-11-02 11:50           ` Andi Kleen
2010-11-02 11:57             ` Richard Guenther
2010-11-02 11:06   ` [PATCH 1/3] Add native ELF and LTO support in collect2 Diego Novillo
2010-11-02 11:07     ` Richard Guenther
2010-11-02 11:41       ` Andi Kleen
2010-11-02 21:26         ` Dave Korn
2010-11-02 11:42     ` Andi Kleen [this message]
2010-10-20 21:27 ` *PING* Re: Updated slim-lto patchkit Andi Kleen
2010-10-20 21:34   ` Diego Novillo
2010-10-20 23:09     ` Andi Kleen
  -- strict thread matches above, loose matches on Subject: below --
2010-10-11 10:19 [PATCH 1/3] Add native ELF and LTO support in collect2 Andi Kleen
2010-10-11 14:49 ` Joseph S. Myers
2010-10-11 14:54   ` Andi Kleen
2010-10-11 15:10     ` Joseph S. Myers
2010-10-11 15:31       ` Andi Kleen
2010-10-11 15:34 ` Dave Korn
2010-10-11 15:36   ` Andi Kleen
2010-10-11 15:53     ` Dave Korn
2010-10-11 15:56       ` Andi Kleen
2010-10-11 16:25         ` Dave Korn
2010-10-11 16:37           ` Andi Kleen
2010-10-11 16:49             ` Dave Korn
2010-10-11 17:35               ` Andi Kleen

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=20101102114112.GC27428@basil.fritz.box \
    --to=andi@firstfloor.org \
    --cc=ak@linux.intel.com \
    --cc=dnovillo@google.com \
    --cc=gcc-patches@gcc.gnu.org \
    /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).