Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Difference between .comm and .globl + .zerofill



Hello,

I asked this question a while ago on Xcode-users but didn't get a reply. Maybe someone here knows the answer?


What is the practical difference between the following two (assembler) declarations, apart from the fact that the former cannot be used in dynamic libraries and the latter can be? (because in one case the data resides in the text section and in the other in the data section). Is there a reason not to always use the latter form?


.text
.align 2
.comm   _a, 4

and

.globl _a
.data
.zerofill __DATA, __common, _a, 4, 2


Thanks,


Jonas _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.