public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jack Howarth <howarth@bromo.med.uc.edu>
To: Steven Bosscher <stevenb.gcc@gmail.com>
Cc: Chris Lattner <clattner@apple.com>, GCC Mailing List <gcc@gcc.gnu.org>
Subject: Re: darwin LTO broken under Xcode 3.2.6/4.0
Date: Sun, 13 Mar 2011 21:13:00 -0000	[thread overview]
Message-ID: <20110313211304.GA14063@bromo.med.uc.edu> (raw)
In-Reply-To: <AANLkTi=rhK2pomz6-mTe3D8qsa_3JSBtj5e090FaJV28@mail.gmail.com>

   For clarity, the radar that I filed over which Apple has inflicted this
pain on us was...

------------------------------------------------------------------------------
	 Problem ID: 7920267    possible linker bug exposed by LTO

28-Apr-2010 07:18 PM Jack Howarth:
The FSF gcc developers are implementing their Link Time Optimization support for darwin and it appears to have exposed a possible assembler or linker bug when compiling the aermod benchmark. The failure can be reproduced with the attached test case which executes...

as -arch x86_64 -force_cpusubtype_ALL -o aermod.o aermod.s                
/usr/bin/ld -dynamic -arch x86_64 -macosx_version_min 10.6.3 -weak_reference_mismatches non-weak -o aermod -lcrt1.10.5.o -L./ aermod.o -lgfortran -lgcc_s.10.5 -lgcc_ext.10.5 -no_compact_unwind -lSystem -v

I have provided a bad_link shell script which automatically executes these commands that produce the linker error...

@(#)PROGRAM:ld  PROJECT:ld64-97.2
Library search paths:
	./
	/usr/lib
	/usr/local/lib
Framework search paths:
	/Library/Frameworks/
	/System/Library/Frameworks/
ld: in aermod.o, in section __TEXT,__text reloc 17: local relocation for address 0x000FB35C in section __text does not target section __00000B26


29-Apr-2010 09:35 AM Jack Howarth:
When the assembly files are modified by hand, it has been found that
if the normal output of -flto in FSF gcc is changed from...

LTO sections (the __GNU_LTO stuff)
.text / .data / etc. (all non-LTO sections)
LTO __section_names section

...to a re-ordered .s file of...

.text / .data / etc. (all non-LTO sections)
LTO sections (the __GNU_LTO stuff)
LTO __section_names section

...the linker error disappears. Is this the approach that we need
to take to avoid this issue?

----------------------------------------------------------------------

Apple never responded to this radar with either an analysis or a notification
of a proposed bug fix.
                 Jack

  parent reply	other threads:[~2011-03-13 21:13 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2011-03-14 17:20         ` Jack Howarth
2011-04-02 22:27           ` Gerald Pfeifer
2011-03-13 23:03     ` Jack Howarth
  -- strict thread matches above, loose matches on Subject: below --
2011-03-13  4:17 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

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=20110313211304.GA14063@bromo.med.uc.edu \
    --to=howarth@bromo.med.uc.edu \
    --cc=clattner@apple.com \
    --cc=gcc@gcc.gnu.org \
    --cc=stevenb.gcc@gmail.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.
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).