Large data sections support

Richard Henderson rth@redhat.com
Sun Jun 12 21:03:00 GMT 2005


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~



More information about the Binutils mailing list