View Single Post
Old 01-05-2006, 19:52   #1 (permalink)
KKaul
Junior Member
 
Join Date: Jan 2006
Posts: 2
Member: 216352
Status: Offline
Thanks Meter: 0
Question Writing patches in C (using ADS or gcc)

Hello!

I recently decided to progress in C, as asm-code becomes too unreadable too soon...
I tried it with ADS 2.2.. It compiles, alright, but somehow I can't get the hang of it... How can I tell it to use my own base address (and not 0x0)? And how can I get the code out of this ELF-Binaries it produces? (And I don't want it to use any (.data...) segments beside the code-segment!)

Can somebody give me some hints or point out some (important) settings for me I have overlooked?
(I have in mind the x65 series with ARM926EJ-S (and I've set this). Further I've set ARM/Thumb Interworking and turned all options what to include in the .o binary off.
For linking, I tried "Simple" setting with RO-Base as 0x0800xxx my wanted base address (is that the right option to set?!) )

I am thankful for any hint how to use this (or the gcc) compiler properly for the ARM926EJ-S...

Thanks in advance
KKaul


PS: Even some russian links would help me atm...


Edit: I finally found "fromelf" that seems to do something like code-extraction from elf-binaries... So I've compiled miniGPS and compared with the bytecode I had... There's something going wrong.. its code is much longer (a0c bytes to 6f3), it does not use some instructions (although the cpu-type ist set to ARM926EJ-S..) and it uses some data-segments!
So I am doing something wrong....

Last edited by KKaul; 01-05-2006 at 20:17.
  Reply With Quote
 
Page generated in 0.09120 seconds with 7 queries