Re: [Gc] GC_register_dynamic_libraries on FreeBSD
ivmai at mail.ru
Thu Feb 10 15:07:19 PST 2011
I've finally added caching for DATASTART/END (if they're defined as a call) but only in GC_register_map_entries, GC_register_dynamic_libraries_dl_iterate_phdr.
I have another question (regarding Darwin): _dyld_bind_fully_image_containing_address is deprecated (and, even more, iPhone/iPad don't have it at all) - is there a way to replace it with something? (As you're probably not a deep guru in Darwin, the question is really to the whole community.)
* dyn_load.c (GC_register_map_entries,
DATASTART only once if DATASTART_IS_FUNC.
* dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr):
Calculate DATAEND only once if DATAEND_IS_FUNC.
* dyn_load.c: Add comment to some endif; realign some code.
* dyn_load.c (GC_init_dyld): Don't use
NO_DYLD_BIND_FULLY_IMAGE defined; add FIXME.
* include/private/gcconfig.h (GC_data_start, GC_find_limit):
Declare if used by DATASTART/DATAEND, respectively.
* include/private/gcconfig.h (DATASTART_IS_FUNC, DATAEND_IS_FUNC):
Define if DATASTART/DATAEND is a function, respectively.
* include/private/gcconfig.h (GETPAGESIZE, NO_PTHREAD_TRYLOCK,
NO_DYLD_BIND_FULLY_IMAGE): Define for Darwin/arm as well; include
Thu, 27 Jan 2011 02:45:49 +0000 "Boehm, Hans" <hans.boehm at hp.com>:
> Sorry about the delay.
> No, I don't think that needs to be done repeatedly. I initially thought it
> would be OK to just register the main data segment as permanent, non-temporary
> roots. And that may be OK. But I'm not sure we'll consistently take that
> code if we have an executable that initially links against no dynamic
> libraries, but then calls dlopen. Is that even possible? Maybe it's safer
> just to cache the values as you suggest and leave the rest of this alone.
> From: gc-bounces at linux.hpl.hp.com [mailto:gc-bounces at linux.hpl.hp.com] On
> Behalf Of Ivan Maidanski
> Sent: Monday, January 17, 2011 1:47 PM
> To: gc at linux.hpl.hp.com
> Subject: [Gc] GC_register_dynamic_libraries on FreeBSD
> Hi Hans,
> In dyn_load.c, we have GC_register_map_entries and
> GC_register_dynamic_libraries_dl_iterate_phdr() which could be called on each
> GC cycle, and these functions use DATASTART/END which are defined as
> GC_FreeBSDGetDataStart() or GC_find_limit() calls under FreeBSD on some
> The question is: should we really need to call GC_FreeBSDGetDataStart,
> GC_find_limit every GC? (If not, we could just call them once and cache the
> Gc mailing list
> Gc at linux.hpl.hp.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 19452 bytes
Desc: not available
Url : http://napali.hpl.hp.com/pipermail/gc/attachments/20110211/ede56519/attachment-0001.obj
More information about the Gc