link issues
- From: "slyi.ath.cx" <leventyilmaz@xxxxxxxxx>
- Date: 20 Jul 2005 10:49:23 -0700
This is not a Fortran language question per se. But I do not know where
else to ask, so please accept my apologies, and perhaps help me out by
giving pointers to relevant discussion groups.
I have a static library composed of several objects. I do not have the
source codes, just the compiled binary of the static link library and
declarations of the routines. I frequently use the routines supplied by
this library, but I need to redefine one of the subroutines. If I
simply go ahead and try to link in the new definition, I get, as may be
expected, link time error for doubly defined symbols.
The compiled binary (on some platform) looks like this (using the GNU
nm):
$ nm foo.lib
<snip>
file1.obj:
00000000 b .bss
00000000 d .data
00000000 N .debug$F
00000000 i .drectve
00000000 t .text
00000004 T _DSPSD
00000004 T _DSPSD@16
00000001 T _DSPXSQ
00000001 T _DSPXSQ@24
<snip>
file2.obj:
00000000 b .bss
00000000 d .data
00000000 N .debug$F
00000000 i .drectve
00000000 t .text
00013a52 T _FOOBAR -> I want to use my own subroutine FOOBAR
00013a52 T _FOOBAR@96
00014f6d T _UNIT
00014f6d T _UNIT@32
000166d5 T _MOME
000166d5 T _MOME@80
<snip>
It is definately possible to unpack the library and replace the objects
with newly compiled ones (infact, it is almost trivial with GNU ar).
But is it possible to replace a single routine in a given object?
Most probably solutions for these type of issues are platform specific.
Nevertheless, any comments, be it general or specific to the platform
that you are possibly comfortable with, will be extremely helpful.
thank you!
- s.l.yi
.
- Follow-Ups:
- Re: link issues
- From: bv
- Re: link issues
- From: glen herrmannsfeldt
- Re: link issues
- From: Rich Townsend
- Re: link issues
- Prev by Date: Re: [F77] Memory problems part 2 - noloop.zip [1/1]
- Next by Date: Re: link issues
- Previous by thread: Feedback on NAGWare f95 Compiler R5/MinGW
- Next by thread: Re: link issues
- Index(es):
Relevant Pages
|