Link error with today's CVS binutils

Geoff Keating geoffk@cygnus.com
Fri Jan 14 11:58:00 GMT 2000


> Date: Fri, 14 Jan 2000 10:39:34 -0600
> From: Eric DeVolder <devolder@evsx.com>

> I've built GCC 2.95.2 with today's CVS head for a ppc-elf as the target.
> The software is a simple, fixed-address app that gets downloaded into
> RAM of an eval board and then run. When linking, I get what I believe is
> an error with the placement of the sections as directed by this linker
> script:
...
>     .klog (NOLOAD) :
>     {
>         PROVIDE (__KLOG_START = .);
>         . = . + 0x00000400;
>         PROVIDE (__KLOG_END = .);
>     } > ram1
> 
>     .data   :
>     {
>         PROVIDE (__DATA_RAM = .);
>         PROVIDE (__DATA_ROM = .);
>         PROVIDE (__DATA_START = .);
>         *(.data)
>         *(.got)                     /* to make the linker happy */
>         PROVIDE (__DATA_END = .);
>     } > ram1
...
> The important thing to note here is that the .klog section is of length
> 0x0400 and is placed into ram1, (0x00010000 to 0x000103FF). The .data
> section is placed after .klog into ram1, and should start at 0x00010400.

I'm not sure about that.  The .klog section isn't placed anywhere, you
have specified NOLOAD.  Sections which are not loaded are allowed to
overlap, for instance the stabs sections.  I may be wrong...

-- 
- Geoffrey Keating <geoffk@cygnus.com>


More information about the Binutils mailing list