bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with weak symbols needed (gcc question).


From: Farid Hajji
Subject: Re: Help with weak symbols needed (gcc question).
Date: Tue, 24 Jul 2001 15:01:20 +0200

>    > What is the "official" way to wrap library (e.g. glibc) functions with
>    > user-defined code, without fiddling in the glibc sources themselves?
>    > 
>    I'm not sure there is an automatic way of doing this. But practical
>    experience suggests that most of these "weak symbols" are declared
>    in the following way:
>    weak_alias (__foo, foo)
>    So all you need to do is call __foo() from your user defined foo()
>    function and that should work (in most cases). I think that's the
>    simplest solution you can come up with.
> 
> That's not officially supported.  The __-prepended symbols are
> implementation details, and subject to removal or change between glibc
> releases.  The official way is using RTLD_NEXT as Marcus described.
Okay, I'll stick with RTLD_NEXT. Thanks again for the clarification.

Regards,

-Farid.

-- 
Farid Hajji -- Unix Systems and Network Admin | Phone: +49-2131-67-555
Broicherdorfstr. 83, D-41564 Kaarst, Germany  | farid.hajji@ob.kamp.net
- - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - -
One OS To Rule Them All And In The Darkness Bind Them... --Bill Gates.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]