forked from gnustep/libobjc2
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce 2-stage Objective-C initialization
This breaks loading into two deterministic stages: class registration and class resolution. The original GNUstep ABI as implemented in Clang emits calls to __objc_exec_class into the user static init section, interleaving them with other static initializers and subjecting them to static initialization ordering issues. +load can therefore be called on one class when another class's module hasn't even been registered. Clang -fobjc-runtime=microsoft preferentially emits objc_module_abi_8*s into a binary section that's then registered and resolved (in that order) once on load, and that loading happens in the "library" init phase on PE/COFF platforms. Compatibility with __objc_exec_class-based registration is not compromised.
- Loading branch information
Showing
1 changed file
with
54 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters