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

Attachment: smime.p7s
Description: S/MIME cryptographic signature


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