|
|
ElfExe - direct meddling in elf executable symbol table to add new symbols
this class modifies the symbol table of the currently running process' executable by directly modifying the internal data of the ld-linux and libdl.so libraries.
This is regrettable, but the alternative is to beg the glibc `maintainers' to fix bugs they hardly even seem to recognise.
The result is a glibc2 version-specific meddling object which will completely die as soon as the internal representation used in libdl.so and ld.so changes. It will need to be ported to new architectures, and may not even be portable to some.
ElfExe () |
create an ElfExe for the current process
Permits new symbols to be defined in the current process
~ElfExe () |
restore the process' symbol table to a pristine state
void addSym (const char *name, void *value, int size, int type, int bind = STB_GLOBAL, int section = SHN_ABS) |
add a global symbol to the executable
Parameters:
name | symbol's mangled name |
value | symbol's value |
size | symbol's allocation size |
type | symbol's STT_ type |
type | symbol's STB_ binding (def: STB_GLOBAL) |
section | symbol's program .section (def: SHN_ABS) |
Generated by: colin@sharedtech.dhis.org on Sat Nov 6 11:59:21 199. |