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: ld ia32, nonconstant expression for load base when using "ADDR(.bss) + SIZEOF(.bss)"


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.


H.J.


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