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]

What's wrong with this linker script?


Hello.

Below is a linker script that I inherited from another project using the
same hardware.  That project was done using the Diab toolset, whereas my
project is using the Gnu toolset for development.  At link time ld
complaints about this script:

    ldppc -X -N -M -Map egu_diag.map -o egu_diag -Tegu_diag.cmd obj1.o
obj2.o
    ldppc: ADDR uses undefined section FLASHCODE

Hmmm... "undefined section"?  It looks good to me.

I don't know if this is significant, but the Gnu tools are (host=x86,
target=ppc) older versions as distributed by Wind River.  Running
"ldppc --version" returns this string:

    ld version cygnus-2.6 (with BFD cygnus-2.6)

Can anyone advise me on what is wrong with the FLASHCODE definition below?

Please CC me with any responses as I am not subscribed to this list.

Thank you.

---------------------------------

MEMORY
{
   DRAM      : ORIGIN = 0x00000000, LENGTH = 0x00200000
   GLOBALS   : ORIGIN = 0x00200000, LENGTH = 0x00200000
   FLASHCODE : ORIGIN = 0x00400000, LENGTH = 0x00200000
   PLD       : ORIGIN = 0x00600000, LENGTH = 0x00000010
   EUMB      : ORIGIN = 0x00600020, LENGTH = 0x00100000
   FLASH1    : ORIGIN = 0xFFF00000, LENGTH = 0x00020000
}

SECTIONS
{
   .text :
   {
     *(.boot_init) *(.text)
   } > FLASH1
   .burn_flash_code (ADDR(.text) + SIZEOF(.text)) : {} > FLASHCODE
   .bss     : {} > DRAM
   .sdram   : {} > GLOBALS
   .epic    : {} > EUMB
   .pld     : {} > PLD
   .sdata   : {} > DRAM
   .data    : {} > DRAM
}

/* This section defines the beginning and ending of the burn flash code
   to be moved to DRAM prior of using */

__DATA_ROM = ADDR(.text) + SIZEOF(.text);
__DATA_RAM = ADDR(FLASHCODE);
__DATA_END = ADDR(FLASHCODE) + SIZEOF(.burn_flash_code);

___DATA_ROM = __DATA_ROM;
___DATA_RAM = __DATA_RAM;
___DATA_END = __DATA_END;


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