This is the mail archive of the binutils@sourceware.org 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 : Re: RE : Re: ld ia32, nonconstant expression for load base when using "ADDR(.bss) + SIZEOF(.bss)"


--- "H. J. Lu" <hjl@lucon.org> a écrit?:
> On Wed, May 16, 2007 at 06:16:12PM +0200, Etienne Lorrain wrote:
> > --- "H. J. Lu" <hjl@lucon.org> wrote:
> > > On Wed, May 16, 2007 at 05:13:47PM +0200, Etienne Lorrain wrote:
> > > >  I can no more define, in the Linux linker file, the section:
> > > >   .realmode 0 : AT (ADDR(.bss) + SIZEOF(.bss) - 0xC0000000) {
> > > >       ....
> > > >       }
> > > 
> > > Is this the same as
> > > 
> > > http://sources.redhat.com/bugzilla/show_bug.cgi?id=4090
> > 
> >  Do not know, how to check?
> >  I know that:
> > .realmode 0 : AT (0x100000 - 0xC0000000) {
> >     ....
> >     }
> >  works (but at the wrong address).
> > 
> >  Will check tomorow if I know what to do.
> 
> You can't use ADDR on section after, like:
> 
> SECTIONS
> {
>   .bar 0 : AT ((ADDR(.foo) + 4095) & ~(4095)) { *(.bar) }
>   .foo : { *(.foo) }
> }
> 
> I think
> 
> SECTIONS
> {
>   .foo : { *(.foo) }
>   .bar 0 : AT ((ADDR(.foo) + 4095) & ~(4095)) { *(.bar) }
> }
> 
> will work.

 It does work when I use 
.realmode 0 : AT (ADDR(.bss) + SIZEOF(.bss) - 0xC0000000) { ... }
 after definning the .bss section, moving the whole block of line in the
 linker file - but it was working with previous binutils (2.17) in this order:
 I think I read somewhere that ld does "lasy evaluation of variables".

 I can modify this linker file, but I wonder if this patch to display
 line number (if I correctly understand show_bug.cgi?id=4090) does not
 create problems in circular dependancies (the size/base of section 1 is
 needed in section 2, and the size/base of section 2 is needed in section 1)?

 Thanks,
 Etienne.


      _____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 


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