lkml.org 
[lkml]   [1999]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: What I suspect
Date
From
In message <Pine.LNX.4.10.9912080840210.1474-100000@penguin.transmeta.com>, 
Lin
us Torvalds writes:
+-----
| On Wed, 8 Dec 1999, David S. Miller wrote:
| > It's not an odd event. It's a feature... Say you want to provide
| > your own special malloc, your strong "malloc" symbol now not only
| > overrides the global references to the "malloc" symbol in the binary
| > itself, but also all of those global references within libc too (and
| > all other shared libraries you load, even via dl_open()). If you want
| > to override any and all malloc activity (and this is useful for
| > malloc/free leak debuggers like electric fence for example) this
| > global weak overriding mechanism is the way it can be done.
| The above case you can KNOW at link-time. Your linker can (and will)
+--->8

Say I want to enable malloc checking at runtime. I use LD_PRELOAD for
that... whoops! Doesn't work. In fact, the best I can hope for is complete
ineffectiveness: it is likely to cause complete breakage, if some things
use my LD_PRELOAD'ed malloc() et al. and others use the standard one.

--
brandon s. allbery os/2,linux,solaris,perl allbery@kf8nh.apk.net
system administrator kthkrb,heimdal,gnome,rt allbery@ece.cmu.edu
carnegie mellon / electrical and computer engineering kf8nh
We are Linux. Resistance is an indication that you missed the point.



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:55    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site