Giter Site home page Giter Site logo

Get size of a native function about angr HOT 3 CLOSED

angr avatar angr commented on May 19, 2024
Get size of a native function

from angr.

Comments (3)

ltfish avatar ltfish commented on May 19, 2024

I don't think we have that interface in angr right now.

One thing you can do, is adding up sizes of all basic blocks inside a function, and subtract the duplicate parts.

I'm running out of cycles for the next three days. Maybe someone else in the team has time to implement this feature - or we are happy to take your contribution :-)

from angr.

rhelmot avatar rhelmot commented on May 19, 2024

This is a value exported by the elf symbols, if they are present! If your binary is not stripped, the symbol with your function's name, accessible through CLE, has an attribute size or sh_size or something that gives you the size of the function, if memory serves.

In the case of stripped binaries, you will need to do something similar to what ltfish described. Somehow using a normalized CFG (what's the interface for that, I forget?) will help you avoid the duplicate parts thing.

from angr.

riyadparvez avatar riyadparvez commented on May 19, 2024

Thanks! Both of them worked.

Opened a relates issue: angr/cle#6. Please have a look.

from angr.

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.