|Overriding symbol from an external library firstname.lastname@example.org (2003-06-20)|
|Date:||20 Jun 2003 00:19:49 -0400|
|Posted-Date:||20 Jun 2003 00:19:49 EDT|
My problem is this :
I have 2 libraries named `libxxx.a' and `libyyy.a' which contains a
subroutine whose name is `mysub'; I want to be able to switch between
those two versions of mysub at runtime, and I want that the code within
`libxxx.a' and `libyyy.a' also makes use of the same version of mysub
( that is the one I have chosen ).
Note that some linkers such as GNU ld ( ld --wrap mysub ... ) allow
users to override a subroutine while keeping a reference to the older
version, by introducing two other symbols ( __real_mysub, __wrap_mysub
). I went trough the docs of GNU ld ( GNU ld command language ), but I
have not been able to sort that out.
Can somebody help ?
Return to the
Search the comp.compilers archives again.