views:

885

answers:

3
+1  Q: 

linux disassembler

Hi

how can I write just a simple disassembler for linux from scratches? Are there any libs to use? I need something that "just works".

thank in advanced

+6  A: 

Instead of writing one, try Objdump.

Based on your comment, and your desire to implement from scratch, I take it this is a school project. You could get the source for objdump and see what libraries and techniques it uses. The BFD library might be of use.

Todd Stout
I't not the aim of my project, i usually use any kind of debugger and disassembler.
Lopoc
+5  A: 

you have to understand the ELF file format first. Then, you can start processing the various sections of code according to the opcodes of your architecture.

Stefano Borini
A: 

http://www.eresi-project.org/

plan9assembler