Fix -fsection-anchors on Darwin
Geoffrey Keating
geoffk@apple.com
Wed May 31 23:57:00 GMT 2006
On 31/05/2006, at 3:07 PM, Mike Stump wrote:
> This is a refinement of Geoff's change to not generate zero byte
> objects to instead not generate zero byte global objects, as that
> is I believe the motivation behind the original change. This works
> as the anchors are only used for non-TREE_PUBLIC things right now.
> If they ever try and play with public things, well, let's just say
> that a linker that can re-order based upon global symbols isn't
> going to be kinda to such code-gen.
>
> Geoff, know of any reason why this would be bad? This would be:
>
> a:
> b: .word 0
Yes, this would be bad. Generally, no object can have two names on
Mach-O, and there is no such thing as a zero-sized object; the only
safe thing to do is to ensure that every label has a different address.
The only way that it can be safe to have two labels in a row like
this is if they start with 'L' and so never get into the object file.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2408 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20060531/c04a62a0/attachment.p7s>
More information about the Gcc-patches
mailing list