This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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: ARM cross compiler


> If there is one problem, then it isn't _all_ working fine, right?
> ;-) hehe

Yes, yes whatever. :)

Thanks, I will have a go at your suggestion and let you know how i get on.


> 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


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