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:51:25 +0200

Hi Kalle,

> [Off-topic for lists; but feel free to quote in public]
pardon me for Cc-ing to bug-hurd, but this is incredibly useful to know!
Thanks for the permission to quote you.

> On Mon, Jul 23, 2001 at 04:07:57AM +0200, Farid Hajji wrote:
> > What is the "official" way to wrap library (e.g. glibc) functions with
> > user-defined code, without fiddling in the glibc sources themselves?
> 
> I don't know about "official", but perhaps you could use the --wrap
> option of GNU ld.  There's an example in the manual.
This is an excellent solution, even better than RTLD (which is not bad
either)! It's no big deal that the wrappers must be prefixed with
__wrap_, as long as the _original_ code is left unchanged. Since most
free OSes use GNU ld nowadays, it is even quite portable. Great!

Thanks for this solution!

-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]