This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [RFC] binutils support for x86-64 medium model shared libraries
- From: Richard Henderson <rth at redhat dot com>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: binutils at sources dot redhat dot com, jakub at redhat dot com, schwab at suse dot de, evandro dot menezes at amd dot com
- Date: Wed, 1 Sep 2004 20:11:51 -0700
- Subject: Re: [RFC] binutils support for x86-64 medium model shared libraries
- References: <20040828135347.GK20631@kam.mff.cuni.cz>
On Sat, Aug 28, 2004 at 03:53:47PM +0200, Jan Hubicka wrote:
> 1) Currently the GOT/PLT sections are placed after data section, I need
> to have thse before for medium model PIC libraries. Please see the
> changes to linker scripts at the end of patch; I would like to ask
> for proper sollution to this especially because I was told that this
> is in conflict with optimization Jakub implements (ie it would be
> nice to use "normal" ordering for small libraries and reversed for
> big. IP relative access to GOT/PLT is very important for
> perfomrance...
Something you could do to avoid this conflict is to move large
data structures to new sections ".large_data", ".large_rodata",
etc, rather than moving the existing sections.
You could arrange for these new sections to have their own PHDRs,
such that program layout looks like
LOAD ... vaddr 0x0000000000400000 ... flags r-x
containing .text, .rodata, etc
LOAD ... vaddr 0x0000000000500000 ... flags rw-
containing .data, .bss, etc
LOAD ... vaddr 0x0000000001000000 ... flags r--
containing .large_rodata
LOAD ... vaddr 0x0000000002000000 ... flags rw-
containing .large_data, .large_bss
The kernel might need some tweaking to set brk properly in this case.
r~