Comments (5)
My input is that a symbol without an address is a concept that CLE handles using the idea of an "import symbol", which comes from ELF binaries. These symbols are given an address of zero by the binary format itself, and cannot be used for anything other than marking a yet-unresolved dependency. This seems like the exact use case you're working with currently, and my recommendation would be to refactor the symbol binding process to use import and export symbols like the rest of CLE, though I don't know anything about mach-o binaries and don't know how well this would work. PE files (windows) don't have an explicit concept of import/export symbols, but we added them in our implementation of the PE loader to simplify the data model.
from cle.
That actually makes perfect sense, thank you. I'm gonna try to implement that change as soon as I figure out how to properly map Mach-O's symbol concept onto import/export symbols.
Any chance we can get symbols_by_addr
and related fields in Backend
documented in a bit more detail so it is clear which symbols should be there and which should not? I.e. make the semantics clear which CLE associates with each field.
from cle.
Documentation is an ongoing effort. I sunk a huge amount of time over the summer into rewriting the docs for the angr/simuvex merge, and since I am now back in class I can't really dedicate much time to formal documentation effort.
You shouldn't need to explicitly insert symbols into that dict specifically, since they are automatically added by the Symbol constructor, given that it actually has a nonzero address.
from cle.
Well that is understandable of course. No worries, I'll make do with reading the source.
Once I can propose a fix I'll let you know.
from cle.
Finally, PR is up. It passed my internal tests so I hope it won't give you any trouble merging.
from cle.
Related Issues (20)
- Many remote file mappings in elfcore is a pain
- Upgrade the pinned pyxbe version
- No module named 'packaging' on Windows and macOS
- Could not find a version that satisfies the requirement pyvex==9.2.7.dev0 (from cle) HOT 7
- Key Error: 160 when loading ELF binary compiled with gcc 12.1 HOT 14
- ELFCore is not pickle-able HOT 3
- Issues when loading a blob with `load_debug_info=True` HOT 1
- CLE fails to load Android apps if classes referenced in the manifest are not part of the classes.dex HOT 1
- [Request] lazy backend memory reader HOT 19
- `Region.__repr__` throws error if any of the field values are `None`
- wrong offsets for elftools.elf.elffile.GNUNeedVerSection
- Refactor relocation loading to allow loading relocations from external sources HOT 3
- AttributeError when loading a UEFI image
- Fails to load PE binaries with non-utf-8 decodable bytes in section name HOT 8
- Loading a bundle file fails HOT 3
- Loading DWARF fails
- Some ARM-HF PLT stubs identified at wrong address
- CompilationUnit only supports contiguous
- Exception when loading Linux Kernel Module
- R_MIPS_HI16 and R_MIPS_LO16 are wrong HOT 2
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 cle.