Commit b6477001 authored by Edward Z. Yang's avatar Edward Z. Yang
Browse files

Add warning comment about Mach-O section name hack.

Signed-off-by: Edward Z. Yang's avatarEdward Z. Yang <>
parent bfe3c4c6
......@@ -6709,6 +6709,11 @@ static int ocRunInit_MachO ( ObjectCode *oc )
getProgEnvv(&envc, &envv);
for (i = 0; i < segLC->nsects; i++) {
// ToDo: replace this with a proper check for the S_MOD_INIT_FUNC_POINTERS
// flag. We should do this elsewhere in the Mach-O linker code
// too. Note that the system linker will *refuse* to honor
// sections which don't have this flag, so this could cause
// weird behavior divergence (albeit reproduceable).
if (0 == strcmp(sections[i].sectname,"__mod_init_func")) {
char *init_startC = image + sections[i].offset;
init_t *init = (init_t*)init_startC;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment