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 10:17:21PM -0700, Richard Henderson wrote:
> > On Sun, Jun 12, 2005 at 09:16:51PM -0700, H. J. Lu wrote:
> > > I guess I may have missed may details. Could someone please point
> > > me to the information why .ldata/.lbss/.lrodata are needed?
> > 
> > We use rip-relative access to most data.  This has a 32-bit
> > signed offset.  If you want to support more than 2GB worth
> > of static data, you need to use a different addressing mode.
> > 
> > In order to not penalize the entire application, some data is
> > still accessed via 32-bit offsets (the bits in .data).  Thus
> > we need a way to separate the data that's accessed via 64-bit
> > operations and those accessed via 32-bit operations.
> 
> So it is different from small data/normal data on ia64, which is a GP
> issue. If it is the case, all large data sections have to come after
> the normal data sections. Otherwise, some data in the normal data
> section may be out of reach via 32bit offsets. Am I correct?

This seems to be very same to .sdata/.sbss and I used this approach
formely.  The problem I hit is that our idea of "small" is much bigger
than most of others and it makes sense for us the GOT to be small too,
so I had to reorder the linker script.  Richard suggested the idea of
large data that has addtional advantage that modules being compiled with
small model (that put everything into .data etc.) are compatible with
medium model binaries as long as the final data segment does not exceed
2GB, so we decided to go ahead with this scheme, but overall I was tring
to share as much implementation with the .sdata machinery used by other
targets as this is very similar.

Honza
> 
> Have we considered mixing normal definition/common and large
> definition/common as well as the related relocations?
> 
> 
> H.J.


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