ARM cross compiler
Gareth Bransby
G.C.Bransby-99@student.lboro.ac.uk
Tue Jun 11 08:24:00 GMT 2002
I have made a linker file to your specification. Now to add the command line options to make it work. I have attatched the output generated when i do 'make'. There are 3 commands issued. It looks like it is the last one that is doing the linking so do i just put the "-Wl, -Tload...." stuff at the end of that?
On Tue, 11 Jun 2002 15:14:32 +0200
Vermeulen Jan <Jan.Vermeulen@siemens.atea.be> wrote:
> Hello Gareth,
>
>
> <ignore section>
>
> >I have built an arm toolchain and it
> >all is working fine. There is only
> >one problem.
>
> If there is one problem, then it isn't _all_ working fine, right?
> ;-) hehe
>
> </ignore section>
>
>
> To answer your question about making your program start at a lower
> address:
>
> Here is a linker script that we use to test our board (i.e. ledtest
> etc)
>
> -----8<-------------------
> ENTRY(main)
>
> SECTIONS {
> . = 0x2000;
> .vector0 :
> {
> LONG(ABSOLUTE( main ))
> }
> .rodata :
> {
> *(.rodata)
> }
> .text :
> {
> *(.text)
> }
> .data :
> {
> *(.data)
> }
> .bss :
> {
> *(.bss)
> }
> }
> -----8<-------------------
>
> So, we made it so that the adress of 'int main(void)' will be placed
> at
> adress 0x2000.
>
> Then the rest is placed behind it (read only data, code, initialised
> variables and variables, in that order (if I'm not mistaking)).
>
> We put this linker-script in a file name "load.ld" and we added:
> "-Wl,-Tload.ld -Wl,-N" to the gcc commandline. (with the rest of our
> options
> ofcourse.)
>
> Hope this might proof helpfull,
> Jan
>
> ------
> Want more information? See the CrossGCC FAQ,
> http://www.objsw.com/CrossGCC/
> Want to unsubscribe? Send a note to
> crossgcc-unsubscribe@sources.redhat.com
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: make.log
Type: application/octet-stream
Size: 477 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/crossgcc/attachments/20020611/4653ae56/attachment-0001.obj>
-------------- next part --------------
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
More information about the crossgcc
mailing list