Re: [Gc] boehm-gc breakage between binutils 2.16.1 and 2.17 on FreeBSD[7.2]
ivmai at mail.ru
Mon Aug 31 23:19:54 PDT 2009
rittle at labs.mot.com wrote:
> Problem: Static root registration fails on FreeBSD7+ when compiled
> with a gcc using binutils 2.17+ for a reason described in a FIXME
> comment in one version of GC_FirstDLOpenedLinkMap() in dyn_load.c.
> Please advise me if patch  can be accepted against gc-7.2/mainline.
> I shall submit patch  to gcc-patches after I learn the disposition.
> --- dyn_load.c.orig 2009-06-04 22:32:39.000000000 -0500
> +++ dyn_load.c 2009-08-31 13:56:14.000000000 -0500
> +# if (defined(FREEBSD) && __FreeBSD__ >= 7)
> +/* On the FreeBSD system, any target system at major version 7 shall */
> +/* have dl_iterate_phdr; therefore, we need not make it weak as above. */
> +#define HAVE_DL_ITERATE_PHDR
I don't like the check "__FreeBSD__ >= 7" because it means I should have to copies of libgc (pre-v7 and v7+) and choose which one to use at runtime if I'd like to write an app running on both FreeBSD versions. Could the libgc itself choose the proper registration strategy at runtime (depending on FreeBSD release)?
More information about the Gc