radareorg / ideas

4 stars 1 forks source link

xtensa #228

Open radare opened 7 years ago

radare commented 7 years ago

r2, objdump and ida do different disasm, pls @brainstorm provide updated objdump sources to get r2 in sync with the binutils code from the xtensa sdk

XVilka commented 7 years ago

@brainstorm please also add a tests for xtensa architecture in radare2-regressions repository (see new/ directory).

brainstorm commented 7 years ago

I don't think the IDA code differed that much from what I saw in r2 at the radarecon but I'll ask the IDA license owner to dump some stuff again for me... or anyone reading this issue can run the git oneline below and install the appropriate IDApython xtensa plugin ;)

Where may I attach the xtensa-objdump -d binary.o output to in radare-regressions? I'm confused :-S

For radare output, I'm doing something on the lines of:

$ git clone https://github.com/espressif/esp32-wifi-lib && cd esp32-wifi-lib && tar xvf libnet80211.a && r2 -A -c pd 100 @ sym.ieee80211_output ieee80211_output.o`

I've put 100 there, but how many bytes do you usually want for a testcase?

brainstorm commented 7 years ago

I've pasted the objdump against the object above with the xtensa-esp32 toolchain here:

https://hardbin.com/ipfs/Qmcvyqn2Komo5bZGDmgwSeddXWi1K6qdxgLV2o6bA4DEFk/#CuwS6nQ2ofcBuBLMAp7aTXB5WfeC6y56oM5VWFFg5t7X

Obtained with the following command/toolchain:

$ ~/dev/espressif/crosstool-NG/builds/xtensa-esp32-elf/bin/xtensa-esp32-elf-objdump -d ieee80211_output.o > ieee80211_output_objdump.txt

This toolchain is easily installable via:

https://esp-idf.readthedocs.io/en/latest/get-started/linux-setup-scratch.html#compile-the-toolchain-from-source

XVilka commented 6 years ago

Updated plugin for IDA https://github.com/pfalcon/ida-xtensa2

ret2libc commented 4 years ago

This issue has been moved from radareorg/radare2 to radareorg/ideas as we are trying to clean our backlog and this issue has probably been created a long while ago. This is an effort to help contributors understand what are the actionable items they can work on, prioritize issues better and help users find active/duplicated issues more easily. If this is not an enhancement/improvement/general idea but a bug, feel free to ask for re-transfer to main repo. Thanks for your understanding and contribution with this issue.