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: [RFC] binutils support for x86-64 medium model shared libraries


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~


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