The code is correct by putting it actually in __DATA; update the docs to match that.
The assembler only sets the S_MOD_INIT_FUNC_POINTERS section flag if the __DATA segment is used, and without that, dyld will just ignore it. It's the linker's job to move it to __DATA_CONST when targetting a new enough OS version.
The code is correct by putting it actually in
__DATA
; update the docs to match that.The assembler only sets the
S_MOD_INIT_FUNC_POINTERS
section flag if the__DATA
segment is used, and without that, dyld will just ignore it. It's the linker's job to move it to__DATA_CONST
when targetting a new enough OS version.