This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Large data sections support
- From: Richard Henderson <rth at redhat dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: binutils at sources dot redhat dot com
- Date: Sun, 12 Jun 2005 14:03:05 -0700
- Subject: Re: Large data sections support
- References: <20050612124135.GA15922@kam.mff.cuni.cz>
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*
> + 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.
r~