This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Large data sections support


> On Sun, Jun 12, 2005 at 02:41:35PM +0200, Jan Hubicka wrote:
> > +     *(.dynlbss)
> 
> In order to use dynlbss, you'd have to verify that all uses of a 
> symbol are via medium model.  And heaven forfend that users actually
> do reference a 1GB object from a shared library.  *shudder*

Hmm, I guess it is sane to expect that if you use shared 40GB
datastructure you will compile all the components by medium model (well
if one can expect something about user doing so...).  So unless you see
some serious issues with this, I would probably keep it around just "for
sure"

> 
> > +   LRODATA=".lrodata       ${RELOCATING-0} : { *(.lrodata${RELOCATING+ .lrodata.* .gnu.linkonce.lr.*}) }"
> 
> You need to push LRODATA into a new page, so that it can be marked 
> read-only.  See how we start a new page when changing to the data
> segment after the regular .rodata section.
> 
> You probably should think about ordering the sections like so:
> 
> 	.bss
> 	.lbss
> 	.ldata
> 	.lrodata
> 
> In this way you could arrange for .lbss to be put in the same
> segment as .bss, which makes for a larger contiguous block of
> zeros.  It could also avoid the need for another segment at all,
> if .lbss is the only one of the three that's non-empty.
> 
> Putting the .ldata section next means that you don't have to
> do the whole push to a new page thing again, since .lbss and
> .ldata generally have the same set of permissions.

I see... given Jakub's comment afterwards, there should be push before
and after lrodata.  I guess different ordering won't save anything as I
need to go from rw to ro and back to rw in any ordering of sections.
Is there way to avoid push when .lrodata is empty (probably the common
case)?

Thanks, once I dig out the SH section flags patch, I will send updated
version.

Honza
> 
> 
> r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]