Heh, so I guess it's my fault...

> I dug through radar and found the bug that triggered the change to as(1):
>
>  <rdar://problem/7920267> possible assembler bug exposed by LTO
>
> The bug was written (ironically) by Jack Howarth!  At the time 4/28/10), 
> gcc's LTO was putting some LTO section first in the file and that pushed some 
> real sections like __text past 
>the 255.  Then the n_sect field for symbols in the __text section could not 
>contain the section index, resulting in the linker complaining about the .o 
>file.
>
>
>The fix in 7920267 was to just error when the assembler sees the 255th 
>section, regardless of which sections have symbols.  That is what you are 
>seeing in Xocde4.
>
>
>The suggestion of using different segment names will not work.  Segments 
>aren't really used in mach-o object files.   All mach-o object files have 
>exactly one LC_SEGMENT load
>command.  It is final linked images that support multiple  LC_SEGMENT load 
>commands.
>
>It is possible to fix this in Xcode 4.x, but I think a solution that just uses 
>one section for all gcc LTO data (and have your own sub-section scheme) will 
>work with all darwin
> assembler versions.
>
> -Nick

Oh, well. The danger of filing radar bug reports with Apple. On the otherhand, 
if they weren't so secretive about
posting Xcode previews to the general ADC accounts these days, we would have 
caught this problem well before
Xcode 4.0 was released. So there is a lot of blame to go around.
         Jack

Reply via email to