Welcome to Discuss Everything Forums...

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.


 

Reply to Thread

Post a reply to the thread: A primer on dynamic loading

Your Message

Click here to log in

What is the number after 87?

 
 

You may choose an icon for your message from this list

Additional Options

  • Will turn www.example.com into [URL]http://www.example.com[/URL].

Rate Thread

You may rate this thread from 1-star (Terrible) to 5-stars (Excellent) if you wish to do so.

Topic Review (Newest First)

  • 06-23-2012, 08:08 AM
    Diablo

    A primer on dynamic loading


    [Graphitemaster] is helping to demystifying the process of tailoring functions for dynamic loading. His tutorial shows how make a dynamic function that prints “Hello World” to the standard output. This is of course rudimentary, but if you have no prior experience with the topic you might be surprised at what actually goes into it.
    Normally your compiled code has addresses in it that tell the processor where to go next. The point of dynamic loading is that the code can be put anywhere, and so static addresses simply will not work. The code above shows how a simple printf statement normally compiles. The callq line is a system call that needs to be replaced with something that will play nicely in the registers. [Graphitemaster] takes it slow in showing how to do this. Of course a dynamic function alone isn’t going to be much good. So the tutorial finishes by illustrating how to program a dynamic code loader.

    Filed under: linux hacks

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •