Problem when linking fairly large FORTRAN object files

marc at arnor.uucp marc at arnor.uucp
Sat Nov 17 03:31:30 AEST 1990


In article <11256 at ccncsu.ColoState.EDU> flatau at handel.CS.ColoState.Edu (flatau) writes:


>I have a library, say "rams.a"  made with "ar r" command.

>Next, I am linking several *.o files with

>xlf -o ramsexe  *.o rams.a

>this results in unsatisfied external refs, even though, I am
>certain these externals are in the library. I have traced the 
>problem a bit further: seems like removing one particular
>object file from *.o list makes the problem to go away.
>However, this particular object file is not unusual in any way.

>If I  keep the library in the object form and link everything 
>(model + library) as

>xlf -o ramsexe *.o
>(i.e. *.o contains all objects needed)

first, I would suggest using the -bloadmap:whatever option to get
an ld history whenever mysteries occur. ("whatever" is the file for
writing the loadmap - in your case ramsexe.map would be my choice).

I would suspect that you have two programs with the same name, and
that one defines the entry which is undefined in the first experiment.

Using the ld defaults, the first occurance of a csect wins.  Future
occurances are deleted, including the additional symbols they may
define.  I suspect that when you ld *.o, the version from the 
"library" comes first.



More information about the Comp.unix.aix mailing list