From: Benjamin H. <be...@ke...> - 2004-04-27 22:51:39
|
On Wed, 2004-04-28 at 01:38, Jonathan C. Ross wrote: > Have you got any pointers for reallocating code? As I said previously, > arm-elf-ld didn't like me trying to tell it where to put stuff. Should > I try > a kernel-style relocation? How would you guys do it? > > As Bern pointed out, we really need profiling... has anybody gotten > -pg to work with the arm-elf toolchain? For moving thigns around, I usually put them in separate ELF sections (I define __sram and __sramdata macros, similar to the kernel equivalent section macros) and then use the ld script to link those sections at different addresses than where they are loaded. Then, at boot, you need a bit of code that copies those to their final address. Ben. |