Execve() again

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I need to modify how programs are loaded for Linux (x86).

I am planning on putting tags in the symbol table, and then
using them as pointers into the code to change the code
at run-time.

I already have the symbol table setup, now I just need
to modify the application's code when it loads.
All I need to do is change values passed to a pushl instruction,
which are tagged by my symbols I have added to the symbol table.

For example:

pushl $12345678
call    foo

could be changed to

pushl $87654321
call     foo

at run-time

I am using the symbol table, because it seems like a good place to
store the locations of these instructions.  Then, when the program loads,
I will run through the symbols, and change the correct bytes as needed.

I am assuming I need to modify execve() to do this, or
can this be done otherwise?


System: Redhat Linux 9 x86 arch

Regards,
Brian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux