Code Monkey home page Code Monkey logo

Comments (5)

rhelmot avatar rhelmot commented on May 20, 2024

Can you provide an example of a static library? All the libraries on my system are dynamically linked.

from angr.

riyadparvez avatar riyadparvez commented on May 20, 2024

Static library is basically an archive of one or more *.o object files, can be built by ar command. For example you want to use lightweight libc like musl, but do not want to force user to install musl on their system, you can just static link musl into your application. Here is a good tutorial on how to create static libraries on linux: http://www.cs.dartmouth.edu/~campbell/cs50/buildlib.html.

from angr.

rhelmot avatar rhelmot commented on May 20, 2024

Alright. What mechanism would you like to have available to resolve import symbols? Static libraries provide no indication of their dependencies (though it's usually just libc), as far as I can tell.

from angr.

riyadparvez avatar riyadparvez commented on May 20, 2024

That is a good question. I haven't thought about that actually, is there any better way than just to leave imported symbols unresolved?

from angr.

rhelmot avatar rhelmot commented on May 20, 2024

The way it's done in code concretely is that the dependencies must be resolved manually by specifying -lname in the compiler flags. -lc is implicit, of course, but everything else is manual. So in the loader options you'll have to somehow specify the libraries that need to be loaded. Pretty sure that if you just specify the libraries in force_load_libs their exports should get picked up automatically.

I'll do this at some point! I've got a lot of classwork to get through, but this can absolutely happen.

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.