Comments (7)
I think it is certainly possible to modify the tool to read raw binary along with any additional information - such as function boundaries specified in a pre-defined format.
You can consider adding
- a couple of inter-dependent new command-line options - say
--raw-binary <binary-filename>
and--function-map <funcmap-filename>
- an implementation - say
DisassembleRawBits(char * BinaryFilename, char *FuncMapFilename)
- that consumes the raw binary and function map file provided to create theMCInstRaiser::mcInstMap
usingMCInstRaiser::addMCInstOrData(uint64_t index, MCInstOrData mcInst)
. This can be called instead ofDisassembleObject(File *, bool)
inllvm-mctoll.cpp
.
Once the instruction map of a function is constructed, the rest of the tool's existing infrastructure can be leveraged unchanged.
Hope that helps.
from llvm-mctoll.
Raising object files is not supported. The tool is designed with an intent to raise only executables (which includes shared libraries).
from llvm-mctoll.
Instead of crashing, a possible improvement is for mctoll to check that the elf binary is executable and if not issue an appropriate message and exit. We probably also want a command line option to override this and force the raising.
from llvm-mctoll.
if (Elf.getEType() != ELF::ET_EXEC && Elf.getEType() != ELF::ET_DYN)
report_fatal_error("Only ELF executables and shared libraries are supported. Use -f to force raising anyway.");
from llvm-mctoll.
Commit 8e5e96c adds code to gracefully exit an attempt raise relocatable ELF binaries (.o files).
The use case / need to raise .o files has to be clearly identified. If there is indeed a justifiable use case, support to raise .o files should be added. Once that support is added, there should be no need for user to force it using an additional flag.
from llvm-mctoll.
hi. i am trying to integrate llvm-mctoll as a plugin into ghidra
is there by any chance a way to mod it to accept some raw binary (ie: not an elf file) a ram dump of arm micro-controller.
i have the complete disassembly control flow instruction function boundary ie: where are function offsets and data offsets are. even data struct...
from llvm-mctoll.
I patched llvm-objcopy to support elf32-bigarm. Kinda strange objcopy don't handle it while backend do emit bigendian at least for powerpc...
Then used it to build an elf file with .text & .data .
set their flags and address hopefully ok.
However still trouble the McCool complains
This arch has not yet supported raising
I am wondering if the tool raiser has support for arm 32bit mode and 16bit thumb mode. Or it only support Aarch64...
I used a qemu emulator front-end to auto unpack the rom image to the ram and dump it.
from llvm-mctoll.
Related Issues (20)
- Wrong lift result for nested "for" loops. HOT 2
- Unable to raise arm binary containing an array HOT 3
- Adapt mctoll to use Opaque pointers HOT 1
- This repo is missing important files
- Unknown prototype for function : _ZNSaIcEC1Ev HOT 1
- Failing to lift binaries HOT 2
- TEST8rr instruction failing to lift properly HOT 1
- Failed to lift binary (core dumped) HOT 1
- Failed to lift simple ARM binary HOT 1
- Build without LLVM source? HOT 1
- Supported LLVM version HOT 1
- assert failed at X86FuncPrototypeDiscovery.cpp:227 HOT 2
- Does Mctoll Translator support Weak Memory Model Architectures ? HOT 1
- cannot compile mctoll without assertions HOT 7
- Error while lifting. HOT 6
- Error when lifting. HOT 1
- is this project still on-going? HOT 1
- i need to install llvm mctoll HOT 3
- generate invalid llir instructions HOT 4
- Cannot get step #4 to work HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from llvm-mctoll.