ld(1) misbehavior?
Steve Emmerson
steve at groucho.ucar.edu
Fri Nov 2 02:27:23 AEST 1990
Greetings,
I'm puzzled by the behavior of ld(1). It seems to ignore a module in an
archive that would otherwise resolve an undefined, global reference.
As you can see from the following, the object file "wxp.o" contains a
reference to the global symbol ".parse_string", which is defined in the
library "libwxp.a", module "tools.o". Yet, even though the library is
specified on the link-line, the resolving module is ignored:
% echo $PATH
/bin:/usr/bin:/usr/ucb:/etc:/usr/bin/X11:/usr/local/bin:/u2/steve/bin/rs6000:/u2/steve/bin:.
% ranlib libwxp.a # strictly speaking, this is not needed
% cc -o wxp wxp.o libwxp.a -lm
0706-317 ERROR: Unresolved or undefined symbols detected:
Symbols in error (followed by references) are
dumped to the load map.
.get_progname
.parse_string
.stricmp
% /usr/ucb/nm -g wxp.o | grep parse_string
U .parse_string
% ar x libwxp.a tools.o
% /usr/ucb/nm -g tools.o | grep parse_string
000005c8 T .parse_string
000030f0 D parse_string
The platform is an RS6000 running AIX 3.1 (with about 200 bug-fixes that
arrived two weeks ago on tape).
Any ideas?
Steve Emmerson steve at unidata.ucar.edu ...!ncar!unidata!steve
More information about the Comp.unix.aix
mailing list