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

Ivan Maidanski ivmai at mail.ru
Wed May 6 04:00:31 PDT 2009


Hi!

"Boehm, Hans" <hans.boehm at hp.com> wrote:
> Here's a patch, derived from yours.  I ended up doing things a bit differently, and just buffering LOAD segments.  This seems likely to both avoid quadratic behavior and keep the data structures simple.  I will also try to do some more testing.
> 
> Thanks.
> 
> (Probably MAX_LOAD_SEGS should just be MAX_ROOT_SETS, instead of multiplying by 3/4.  There aren't too many other sources of static root segments.  I'll fix that.)
> 
> Hans
> 
> > -----Original Message-----
> > From: Ludovic CourtХs [mailto:ludo at gnu.org] 
> > ...

Fix also the following in the patch:
1.
            for (i = n_load_segs; i >= 0; i-- ) {
->
            for (i = n_load_segs; --i >= 0; ) {

2. (since n_load_segs and MAX_LOAD_SEGS are defined only if PT_GNU_RELRO)
          if (n_load_segs >= MAX_LOAD_SEGS) ABORT("Too many PT_LOAD segs");
#         ifdef PT_GNU_RELRO
->
#         ifdef PT_GNU_RELRO
            if (n_load_segs >= MAX_LOAD_SEGS) ABORT("Too many PT_LOAD segs");

Bye.


More information about the Gc mailing list