![]() |
|
#3
|
|||
|
|||
|
I've made some progress and I am now able to link and run my test program under qemu.
I did the following to the original .so lib:
Code:
int
puts( const char *s )
{
static int ( *fn )( const char *s ) = NULL;
if( fn == NULL )
fn = dlsym( RTLD_NEXT, "puts" );
return fn( s );
}
Now my program links and runs but as soon as I reference a function from the binary shared library (or if I manually use dlopen on it) the execution hangs: Code:
Reading symbols from ./test... (No debugging symbols found in ./test) (gdb) run Starting program: /home/zzz/test [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1". Start main ^C Program received signal SIGINT, Interrupt. 0x0000fffff4bfc434 in std::set_unexpected(void (*)()) () from ./libscope-auklet.so (gdb) quit I don't see a solution to this last problem so now I will investigate a way to convert that .so to a (big) .o. This means getting rid of the .dynsym section and replacing all stubs in the .plt section - not an easy task. |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How create Static Library (lib) in delphi? | Newbie_Cracker | General Discussion | 7 | 10-26-2011 22:33 |
| Link To Us, several banners and logos for you to link with us | Shub-Nigurrath | General Discussion | 0 | 01-03-2008 20:51 |