This is the mail archive of the gcc@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: darwin LTO broken under Xcode 3.2.6/4.0


On Mar 13, 2011, at 12:42 PM, Steven Bosscher wrote:

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

That data structure only has to do with symbol tables.  However, various tools that work on MachO have the exact same limitation in their internal data structures, since "there can't be more than 256 sections".

I'm sorry that the toolchain doesn't work the way you'd like it to, but the right answer is still to plop whatever metadata you guys want into a single section.

-Chris


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


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