Multiple symbols definition
Cournapeau David
cournape@atr.jp
Wed Aug 31 02:02:00 GMT 2005
More information about the Binutils mailing list
Wed Aug 31 02:02:00 GMT 2005
- Previous message (by thread): Multiple symbols definition
- Next message (by thread): -rpath for win32/mingw?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Tue, 2005-08-30 at 09:23 -0700, David Daney wrote: > Cournapeau David wrote: > > Hi, > > > > I would like to know where I could find an good explanation about the > > way that multiple definitions of one symbol are resolved at link time > > and runtime ? My problem is that I would like to control the way that > > multiple definition for one symbol are resolved, ie force to resolve the > > symbol in one particular library. > > > > For example, let's say I want to wrap malloc calls in my dynamic > > library, is it possible to link against a small wrapper library which > > would define its own malloc, and to force the linker to resolve to this > > wrapper library , and not to the C library ? > > > > It sounds like you want to use --wrap. The example in the ld > documentation for --wrap is nearly identical to what you describe. > > David Daney > The problem of wrap is that is does not wrap the calls made through dynamic libraries. Let's say I am programming a library libbar, which calls some functions of libfoo. The malloc calls in libfoo are not (and cannot be, as far as I understood from one on my former question on this list) wrapped when using --wrap, because the symbols are already resolved in libfoo. David
- Previous message (by thread): Multiple symbols definition
- Next message (by thread): -rpath for win32/mingw?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list