Hi,
Is there any way that I can get the address of a function which is declared static in another file?
File1.c
static int func1()
{
}
File2.c
{
void *addr;
addr = getAddressOf("func1");
}
void *getAddressOf(char *fn_name)
{
/* Magic here */
}
My intent is to replace the address of the func1 with the func2, so that whenever the func1 is called from file1, func2 will be invoked.
Once I get the address.
I also tried --wrap but it is not working for the static function.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 379 |
Nodes: | 16 (2 / 14) |
Uptime: | 70:53:00 |
Calls: | 8,084 |
Calls today: | 2 |
Files: | 13,069 |
Messages: | 5,849,833 |