Giter Site home page Giter Site logo

Comments (5)

rhelmot avatar rhelmot commented on July 28, 2024

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.

 avatar commented on July 28, 2024

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.

rhelmot avatar rhelmot commented on July 28, 2024

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.

 avatar commented on July 28, 2024

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.

 avatar commented on July 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.