summaryrefslogtreecommitdiff
path: root/dyn_load.c
diff options
context:
space:
mode:
authorivmai <ivmai>2011-03-07 22:43:02 +0100
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:56 +0200
commitbbca3e37f34a7013d50c4badea5a156c87fd07ca (patch)
tree8fd8e8887b03f70e4199d627171d776ee4592ecf /dyn_load.c
parent3da6257debbf51b1478c877ca0d154cff731af3f (diff)
2011-03-07 Ivan Maidanski <ivmai@mail.ru>
* dyn_load.c (GC_init_dyld): Do not invoke _dyld_bind_fully_image_containing_address() if GC_no_dls (as it is not required to register the main data segment in that case). * include/gc.h (GC_no_dls): Adjust the comment.
Diffstat (limited to 'dyn_load.c')
-rw-r--r--dyn_load.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/dyn_load.c b/dyn_load.c
index a15a8e2..49448a1 100644
--- a/dyn_load.c
+++ b/dyn_load.c
@@ -1332,6 +1332,8 @@ GC_INNER void GC_init_dyld(void)
# ifdef NO_DYLD_BIND_FULLY_IMAGE
/* FIXME: What should we do in this case? */
# else
+ if (GC_no_dls) return; /* skip main data segment registration */
+
/* When the environment variable is set, the dynamic linker binds */
/* all undefined symbols the application needs at launch time. */
/* This includes function symbols that are normally bound lazily at */
@@ -1342,9 +1344,9 @@ GC_INNER void GC_init_dyld(void)
GC_printf("Forcing full bind of GC code...\n");
# endif
/* FIXME: '_dyld_bind_fully_image_containing_address' is deprecated. */
- if (!_dyld_bind_fully_image_containing_address(
+ if (!_dyld_bind_fully_image_containing_address(
(unsigned long *)GC_malloc))
- ABORT("_dyld_bind_fully_image_containing_address failed");
+ ABORT("_dyld_bind_fully_image_containing_address failed");
}
# endif
}