[gclist] Boehm GC & Linux/SPARC

Boehm, Hans hans_boehm@hp.com
Wed, 14 Mar 2001 15:12:40 -0800

> Q2: Is anyone using the Boehm et al collector with Linux/SPARC?
> There seems to be some code in it to handle that combination, but it
> doesn't work.  I tried it (using cf.sourceforge.net) and found that it
> crashes very early.  The definition of DATASTART using 
> doesn't work, because __data_start is not defined (both __data_start
> and data_start are zero).
> I had a look at the linker script (output by `ld -v'),
> and based on that, I tried using __etext for DATASTART.
> However, that didn't work, because there are some unmapped pages
> between the rodata (which follows __etext) and the other data.
> There didn't seem to be any linker-defined symbol I could use
> to find the end of rodata or the start of the remaining data.
This seems to be somewhat distribution dependent.  (Dependent on both glibc
and the linker script, to be more precise.)  I believe there is now a
consensus that __data_start should be defined, and it is defined in glibc on
most of the architectures, I believe.  If it still isn't defined on SPARC,
there's a good chance the glibc maintainer (drepper@redhat.com) would
appreciate a patch.

In the latest 6.0alpha versions, if you define SEARCH_FOR_DATA_START the
collector will look for a nonzero definition of first __data_start, then
data_start, and then search backward from _end if they both fail.  That
should work OK if someone also submits the glibc patch.

My version actually uses GC_SysVGetDataStart on Linux/SPARC.  Does that not