This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix -fsection-anchors on Darwin


On Mon, Apr 26, 2010 at 02:22:11PM -0700, Mike Stump wrote:
> On Apr 14, 2010, at 8:47 AM, Jack Howarth wrote:
> >   Could you update your comments on this? Since it seems unlikely
> > that the linker will ever been changed on darwin to support section-anchors,
> > it seems to leave on the turning off subsections_via_symbols if we
> > wanted to implement section-anchors support on darwin, no?
> 
> I don't believe they have changed any, nor has the linker, that leaves just changing the compiler to manage subsections_via_symbols appropriately.
> 
> >> If the optimizer wants to jam all the data together into one object  
> >> itself, and then write out that object, that would work as well, and  
> >> there is something appealing about that.  Also, to get nice codegen and 
> >> dead code stripping, I think we want LTO to manage this issue.
> > 
> > Since it appears that Mach-O LTO will be possible, I assume this can
> > be handled through that option.

Mike,
   Do you think that Steven will be running into any issues with
subsections_via_symbols while implementing the Mach-O LTO support
or can this likely be put off until later? I ask because he thinks
we could be running into linker bugs.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43729#c15

           Jack

> 
> I'm not an LTO expert, so I can't comment on it, though, if I randomly guessed, yes, it probably could.
> 
> On Apr 14, 2010, at 9:00 AM, Jack Howarth wrote:
> > 
> > This openradar seems to discuss disabling subsections_via_symbols in the
> > assembly file but doesn't indicate how to do it from within the compiler...
> > 
> > http://openradar.appspot.com/7201596
> 
> You say:
> 
> int do_subsections;
> 
> if (do_subsection)
>   printf(". subsections_via_symbols\n");
> 
> and then set do_subsections appropriately (when flag_section_anchors is on).   See darwin.c for the one line that needs to be changed.
> 
> With that off, the linker should not reorder and slice and dice, or at least, that's the theory.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]