Mailing Lists: Apple Mailing Lists

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

__cxa_guard_acquire / __cxa_guard_release



Trying to build our kext in Tiger, we ran into a snag with undefined symbols for ___cxa_guard_acquire and ___cxa_guard_release when we tried the kextload. Those symbols couldn't be found in any source text for the build. Searching the assembly code, we found the symbols as being near a line which had a statically included class instantiation.

That is a construction such as:

void func(void)
{
	...
	static Class myClass;
	...
}

Evidently the compiler generates these as a by-product of the class instantiation.

By moving the class instantiation out of the function, into global space, the symbols were not generated.

Also, the symbols weren't generated when we switched back to gcc 3.3 instead of the default 4.0.

Does this mean that we should be linking against something else, in order to include static classes inside functions and gcc 4.0?

Does it mean that we shouldn't use static classes in that manner in kext code?

Or does it mean that we should be using gcc 3.3 for our kexts?

Thanks,
Thane Heninger
Iomega

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-drivers mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-drivers/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.