Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  bFLT & IDA Disassembly
« previous next »
  • Print
Pages: [1]

Author Topic: bFLT & IDA Disassembly  (Read 2585 times)

Offline jcsistemas2001

  • Member
  • *
  • Posts: 2
bFLT & IDA Disassembly
« on: February 18, 2013, 06:02:55 AM »
Hi All,

I want to disassembly an uClinux application (.flt file) and after assembler and execute again.

Using the bFLT loader available (with IDA Pro) and following sample code (main.c):

int main(int argc, char **argv)
{
   return 0;
}

After pass this code by the toolchain [i) gcc -S main.c, ii) as main.o, iii) ld.exe -elf2flt crti.o crtn.o crt1.o libc.a main.o), the program run without problems in a Coldfire board.

After that, I disassemble the main.flt (obtained from the previous process) with the bFLT loader and IDA (with default options). Later, I produce the assembler code (mainR.s) and I do the following tasks: i) as -M mainR.s, ii) ld.exe -elf2flt, iii) Execute the mainR.flt. In this last task, I get an error if I try to execute the program mainR.flt:

"Unable to read code data bss, errno 22"

The header FLT is:

Magic:        bFLT
Rev:          4
Build Date:   Mon Feb 18 18:02:34 2013
Entry:        0x50
Data Start:   0x480
Data End:     0x3f
BSS End:      0x3f
Stack Size:   0x1000
Reloc Start:  0x3f
Reloc Count:  0xb
Flags:        0x1 ( Load-to-Ram )

And the original (before use the loader and IDA) is:

Magic:        bFLT
 Rev:          4
 Build Date:   Mon Feb 18 17:46:13 2013
 Entry:        0x44
 Data Start:   0x400
 Data End:     0x43c
 BSS End:      0x470
 Stack Size:   0x1000
 Reloc Start:  0x43c
 Reloc Count:  0x2f
 Flags:        0x1 ( Load-to-Ram )

I'm not sure where the problem is.

Please, if you can give any advices.

Thanks
Logged

Offline torne

  • Developer
  • Member
  • *
  • Posts: 994
  • arf arf
Re: bFLT & IDA Disassembly
« Reply #1 on: February 18, 2013, 09:47:41 AM »
This forum is about the development of Rockbox, and has nothing to do with uClinux. This is not really a suitable place to ask.
Logged
some kind of ARM guy. ipodvideo/gigabeat-s/h120/clipv2. to save time let's assume i know everything.

Offline jcsistemas2001

  • Member
  • *
  • Posts: 2
Re: bFLT & IDA Disassembly
« Reply #2 on: February 19, 2013, 01:18:30 AM »
Hello Torne,

I asked because I found this on their website:

http://www.rockbox.org/wiki/pub/Main/AngoraVX435/rebfltidaloader.zip

Anyway, Thanks
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  bFLT & IDA Disassembly
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.064 seconds with 15 queries.