[Gc] Re: [PATCH] Dealing with `.data.rel.ro'

Ludovic Courtès ludo at gnu.org
Tue Mar 3 14:38:22 PST 2009

Hi Hans,

"Boehm, Hans" <hans.boehm at hp.com> writes:

> Did you encounter problems without the overlap checking for exclusion
> ranges?

Yes.  As mentioned in the comment added by the patch, the address range
covered by the `PT_GNU_RELRO' entry is a subset of a previously
encountered `LOAD' segment, so it needs to be excluded.  It's easy to
notice with readelf(1) (see

We could add a test here that would build a shared library with "-z
relro" when using GNU ld.  We could arrange so that this test is only
run on GNU systems.

> 1) I think this only handles a partial overlap with exactly one other
> range.  I don't immediately see why it's more important to handle that
> case than overlaps withmultiple existing exclusion ranges.

Exclusion ranges cannot overlap.  This is enforced in
`GC_exclude_static_roots ()'.

> 2) This only works if the ranges are added in the right order.

Hmm, what do you mean?


More information about the Gc mailing list