Unix loader (ld) query

Ray Seyfarth brs at beach.cis.ufl.edu
Sat Feb 11 00:46:03 AEST 1989


In article <1247 at ccnysci.UUCP> jeffrey at ccnysci.UUCP (Jeffrey L Bromberger) writes:
>1) My Fortran program calls a routine in a library
>2) The library routine calls another library routine which I want to replace.
>...
The answer is that the library is a collection of ".o" files.  It is not a
simple collection of code and data, although each constituent it.  If you
need any data or function from an object file in the library, you get the
whole object file.  For example, assume that "a.o" contains the code for
functions a1 and a2.  If you code your own version of a2 and call function
a1, then you will have 2 versions of a2.  It doesn't matter whether a1 calls
a2 or not.
There is no simple solution.  The solution must depend on your exact needs.
However, I would guess that you need to replace the entire ".o" file being
referenced.  You can use "nm" to determine the contents of your library.
Then you can assess the magnitude of the problem.
--
In Real Life:		UUCP: {gatech|mailrus}!uflorida!beach.cis.ufl.edu!brs
Ray Seyfarth		Internet: brs at beach.cis.ufl.edu
University of Florida	"If you can't look ahead, don't bother to look back."



More information about the Comp.unix.wizards mailing list