bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Does the linker really generate these labels? (arm-elf-ld)


From: Nick Clifton
Subject: Re: Does the linker really generate these labels? (arm-elf-ld)
Date: 31 Mar 2003 14:38:02 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2

Hi Ken,

>     I'm now using Cygnus to build program on ARM architecture,

First of all please note that this is the mailing list for the GNU
Binary Utilities (or binutils).  It is not a corporate help list.  If
you have bought tools from Cygnus or anybody else, you should contact
them for support.

Secondly you do not mention which version of the tools you are using.
This is quite important information.

>     but i meet a problem that the variable(s) will not be
>     initialized by the system, so i take a look at the startup file
>     provided by ATMEL, it used some external functions to do that
>     thing, and remarked these labels are automatically generated by
>     the linker, and i do so, but the linker tell me that it can't
>     find such symbles: 
> 
> cstartup_flash.o:cstartup_flash.s:339: undefined reference to 
> `Image$$RO$$Limit'
> cstartup_flash.o:cstartup_flash.s:339: undefined reference to 
> `Image$$RW$$Base'
> cstartup_flash.o:cstartup_flash.s:339: undefined reference to 
> `Image$$ZI$$Base'
> cstartup_flash.o:cstartup_flash.s:339: undefined reference to 
> `Image$$ZI$$Limit'
> 
> Does the linker really generate these labels?

ARM's linker does, the GNU linker does not.

You have two choices - either write your own linker script which
defines these symbols, or edit your cstartup_flash.s assembler source
file and replace the symbols with names that the GNU linker does
define.

The probable conversion between the symbols is as follows:

   ARM SDT Symbol       GNU ld Symbol    Description
  ----------------      -------------   --------------------------------------
  Image$$RO$$Limit      __etext         ; End of ROM code (=start of ROM data)
  Image$$RW$$Base       __data_start    ; Base of RAM to initialise
  Image$$ZI$$Base       __bss_start__   ; Base and limit of area
  Image$$ZI$$Limit      __bss_end__     ; to zero initialise

Cheers
        Nick





reply via email to

[Prev in Thread] Current Thread [Next in Thread]