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]

Re: different memory locations


> Hello everybody! How can I have some routines at one memory location,
> let“s say internal ram at 0x0 and the rest of the program in the external ram
> at 0x0201 8000?

1st)
Try to create 2 different sections (".text0" and ".text1").

Section ".text0" could contain the routine to be load at address 0x0 and section
".text1" could contain the rest of the code. After that you can tell the linker to
put the sections in the appropriate locations. Your program loader will finish the
work...


2nd)
You can put all your code in the same section (probably as you are doing now...),
and copy the routine to be inserted at address 0x0 at runtime. I use this approach
with vector table of the PowerPC processors.

Joćo Cadamuro Junior
LIT / CPDTT / CEFET-PR


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


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