diff options
author | Edward Z. Yang <ezyang@mit.edu> | 2013-09-17 00:55:46 -0700 |
---|---|---|
committer | Edward Z. Yang <ezyang@mit.edu> | 2013-09-17 00:55:46 -0700 |
commit | b6477001fce89ecd4c3e61cb76440ac43e069c95 (patch) | |
tree | 3df3a745239459c765d46fbf1bfff0a13f0d4032 /rts/Linker.c | |
parent | bfe3c4c69a36ac5e56a680bdd83e8d9ccba1d1e1 (diff) | |
download | haskell-b6477001fce89ecd4c3e61cb76440ac43e069c95.tar.gz |
Add warning comment about Mach-O section name hack.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Diffstat (limited to 'rts/Linker.c')
-rw-r--r-- | rts/Linker.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/rts/Linker.c b/rts/Linker.c index 4f85498f0c..58cfca684a 100644 --- a/rts/Linker.c +++ b/rts/Linker.c @@ -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; |