Roland Mainz wrote:
Does Solaris and/Or Sun Studio have any linker/compiler flags to warn
users if a library or other code defines a symbol which is already used
by libc ?
-- snip --
I'd like to get similar output in Solaris - is that somehow possible ?
Multiple definitions within dynamic objects are allowed, hence there
are no error/warning messages given. But you can get the information.
% man ld
.....
-m
Produces a memory map or listing of the input/output
sections, together with any non-fatal multiply-defined
symbols, on the standard output.
.....
% cat main.c
long strtol()
{
return (0);
}
void main(){}
% cc -Wl,-m -o main main.c | tail -20
MULTIPLY DEFINED SYMBOLS
symbol definition used also defined in
__environ_lock /SUNWspro/lib/crt1.o
/lib/libc.so
___Argv /SUNWspro/lib/crt1.o
/lib/libc.so
strtol main.o
/lib/libc.so
environ /SUNWspro/lib/crt1.o
/lib/libc.so
_environ /SUNWspro/lib/crt1.o
/lib/libc.so
--
Rod
_______________________________________________
opensolaris-discuss mailing list
[email protected]