For Programmers: Free Programming Magazines  


Home > Archive > Unix Programming > March 2006 > Re: overriding functions with functions that call the original









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: overriding functions with functions that call the original
Paul Pluzhnikov

2006-03-23, 4:07 am

Henry Townsend <henry.townsend@not.here> writes:

> My understanding is that they do have shared libraries but
> that symbol resolution is already done by the time the runtime linker
> fires up.


With default linking mode, that's correct (AIX shared libraries
are much more similar to Win32 DLLs, than to any other UNIX).

However, AIX5.1 introduced "deferred" linking, which works just
like all other UNIX shared libraries.

> My understanding is limited by being neither a linking expert nor an
> AIX user, but it does seem clear that runtime interposition on AIX
> cannot be done.


It can be done quite easily, but you have to name your library
libc.a and the definition must come from a "shared object module"
named shr.o [if that's where the executable says it is importing
the symbol from]. And if you do that, then you must provide all
other symbols that the exe imports from libc.a(shr.o) as well.

It's a bit tricky, but my product does it all the time.

Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
Paul Pluzhnikov

2006-03-23, 7:04 pm

Henry Townsend <henry.townsend@not.here> writes:

> What is your product?


http://www.parasoft.com/insure

Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com