lkml.org 
[lkml]   [1999]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: What I suspect
   Date: Tue, 7 Dec 1999 23:57:53 -0800 (PST)
From: Linus Torvalds <torvalds@transmeta.com>

So I still think pre-linking should be perfectly fine =without=
checking weak symbols like Davem suggested. In fact, I'd argue that
re-checking is the wrong thing to do from a "least surprises"
standpoint.

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.

This is the specified ELF behavior, we didn't make this up. :-) And
it's there so you can do things like "oh I want to override open() so
it understands WWW urls" or things like my malloc example.

Later,
David S. Miller
davem@redhat.com

-
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