Comments (2)
Hello @PaulDance
Thank you so much for providing all these details and taking time to share
you thoughts and propose a solution. Highly (highly) appreciated.
Now regarding the issue itself. I agree that the TODO
in the code should be replaced by a more comprehensive message and I'm ok with the LIEF_ERR(...);
message. But [...] :) I'm do not completely agree with:
followed by a return make_error_code(lief_errors::read_error);, or something like that.
After that, there should not be any symbol in the symbols table.
If I'm not wrong, you expect to have -- somehow -- the same representation with LIEF as the Mach-O loader.
The design choice in LIEF is to provide all the information as long as it is possible to provide them and to avoid making strong* assumptions about what the loader would do.
The loaders can evolve and nothing could prevent Apple to relax the condition on the library's ordinal even though right now the loader (fails?) to load the binary you provided.
from lief.
Thanks for the detailed answer. Indeed, I would have expected the LIEF parser to comply with the "specification". From my point of view, the parsing just ends up being lost in random bytes and the reported data does not make much sense as the original bytes did not either.
However, I understand your design choices and can stand by them. If your decision is final, then this issue can be closed and I'll try to add some additional checks on my end.
from lief.
Related Issues (20)
- Long section names in PE HOT 2
- installed by pip missing many attributes HOT 1
- Protections numbers meaning in Mach-O HOT 1
- `lief.PE.parse' function throws an out-of-range exception
- Python API missing `set_resources()` HOT 3
- Two issues in pe_reader (examples/c/pe_reader.c) HOT 1
- Symbol lookup error when swapping symbols name HOT 1
- Test binaries are not available HOT 1
- error: no declaration matches βLIEF::read_out_of_bound::read_out_of_bound(uint64_t) HOT 1
- Support for Rust demangle HOT 2
- Allocation-size-too-big in LIEF::MachO::init_c_sections
- Using std::isprint to determine may miss some strings HOT 1
- More pre-compilation targets for rust bindings HOT 2
- Support for .relr.dyn HOT 2
- str(Binary) -> MemoryError: std::bad_alloc HOT 2
- Missing Exports in PE (dll) HOT 2
- 'Header' object has no attribute 'flags_list' and 'lief._lief.ELF' has no attribute 'PROCESSOR_FLAGS' HOT 2
- AttributeError: property of 'Binary' object has no setter HOT 1
- some QNX ELF have no SHT HOT 1
- handling QNX ELF note, type 3 (stack info)
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 lief.