public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* darwin LTO broken under Xcode 3.2.6/4.0
@ 2011-03-13  4:17 Jack Howarth
  2011-03-13  7:35 ` Ian Lance Taylor
                   ` (2 more replies)
  0 siblings, 3 replies; 34+ messages in thread
From: Jack Howarth @ 2011-03-13  4:17 UTC (permalink / raw)
  To: gcc

   With release of Xcode 3.2.6/4.0 this week, an unfortunate change was made to
the darwin assembler which effectively breaks LTO support for darwin. The design
of LTO on darwin was based on the fact that mach-o object files tolerated additional
sections as long as they didin't contain symbols. With Xcode 3.2.6/4.0, the assembler
appears to be strictly counting sections and objecting when these exceed 255. This
breaks huge sections of the lto testsuite and prevents larger projects like xplor-nih
to compile if Xcode 3.2.6/4.0 is installed. I am afraid that unless Apple reverts this
change, our only recourse would be to resort to an elf object container for the lto
sections within the mach-o files (introducing an undesired dependency on libelf for
FSF gcc on darwin). My understanding was that the lto design did not allow the number
of sections required in the lto files to be reduced.
              Jack

^ permalink raw reply	[flat|nested] 34+ messages in thread
* Re: darwin LTO broken under Xcode 3.2.6/4.0
@ 2011-03-13 19:43 Steven Bosscher
  2011-03-13 19:48 ` Chris Lattner
  2011-03-13 20:03 ` Jack Howarth
  0 siblings, 2 replies; 34+ messages in thread
From: Steven Bosscher @ 2011-03-13 19:43 UTC (permalink / raw)
  To: Chris Lattner, GCC Mailing List

(sorry Chris, I forgot the list)

On Mar 13, 2011, at 11:59 AM, Chris Lattner wrote:

> Sorry, I actually mean 255 of course, because of the NO_SECT
> sentinel.  Here are the relevant bits from nlist.h.  I'm not
> sure how you expect the toolchain to store more than 256
> sections in a uint8_t.

How self-righteous, and misinformed.

No-one is expecting to store >256 in a uint8_t. The structures you
quote only apply to symbol tables, which are references into sections
in Mach-O. But not all sections have symbols. None of the sections in
the GNU_LTO segment have symbols.

The documentation you should be quoting is the part about Mach-O
loader commands, and there is no limit AFAICT on the number of
LC_SEGMENT/LC_SEGMENT_64 loader commands. There is also nothing in the
segment command structures that suggests a limit of 255 sections.

Besides, it worked before, which suggests that, well, it worked.

This is not the limitation of Mach-O you are looking for.

Ciao!
Steven

^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2011-04-02 22:27 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-13  4:17 darwin LTO broken under Xcode 3.2.6/4.0 Jack Howarth
2011-03-13  7:35 ` Ian Lance Taylor
2011-03-13  7:52 ` Chris Lattner
2011-03-13  7:52   ` Jack Howarth
2011-03-13 11:39 ` Jan Hubicka
2011-03-13 15:38   ` Jack Howarth
2011-03-13 18:19     ` Chris Lattner
2011-03-13 18:26       ` Jack Howarth
2011-03-13 18:55         ` Chris Lattner
2011-03-13 18:59           ` Chris Lattner
2011-03-13 19:11             ` Jack Howarth
2011-03-13 19:05           ` Jack Howarth
2011-03-13 19:47             ` Chris Lattner
2011-03-13 19:56               ` Jack Howarth
2011-03-13 20:43               ` Jack Howarth
2011-03-13 19:07       ` Jan Hubicka
2011-03-13 19:45         ` Chris Lattner
2011-03-13 18:35   ` Jack Howarth
2011-03-13 18:54     ` Ian Lance Taylor
2011-03-14 19:48       ` Jack Howarth
2011-03-14 21:09         ` Ian Lance Taylor
2011-03-14 21:33           ` Jack Howarth
2011-03-13 19:43 Steven Bosscher
2011-03-13 19:48 ` Chris Lattner
2011-03-13 20:03 ` Jack Howarth
2011-03-13 20:38   ` Steven Bosscher
2011-03-13 20:41     ` Jack Howarth
2011-03-13 20:43       ` Steven Bosscher
2011-03-13 20:49         ` Jack Howarth
2011-03-13 20:55         ` Jack Howarth
2011-03-13 21:13         ` Jack Howarth
2011-03-14 17:20         ` Jack Howarth
2011-04-02 22:27           ` Gerald Pfeifer
2011-03-13 23:03     ` Jack Howarth

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).