Article View: gnu.gcc.help
Article #53474linking order...
From: Gray Watson
Date: Fri, 22 Nov 1991 05:17
Date: Fri, 22 Nov 1991 05:17
38 lines
1798 bytes
1798 bytes
Background: SunOS 4.1, Sparc 1+, gcc version 1.37.1, gnu-ld This is probably a FAQ but I can't find a solution in the docs anywhere. Situation: gcc p.o -la -lb -where- liba.a contains references to libb.a and (this is the problem) libb.a also has references back to liba.a. My extra wrinkle is that I am trying to override system functions in liba that are used in libb. What happens is that the routines in liba.a are ignored and not linked in at all. I know, I know. This is not a good idea with PURE layered programming. I also know that this will happen with my native cc and ld. Question 1: Is there a realatively easy solution to this? Question 2: Why can't ld load all command line files and resolve them independly of command line order? What am I missing? Can you tell that this ain't my bailiwick? I just use the stuff :-). Thanks in advance for any and all info, gray ______________________________________________________________________________ internet mail: gray@antaire.com (really gray%antaire.com@med.pitt.edu) us mail: antaire corp. / 414 s. craig st. suite 262 / pittsburgh, pa 15213 two things to get rid of: pacs and racism (not necessarily in that order)
Technical Details
Message-ID:
<9111220517.AA01215@antaire.com>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cis.ohio-state.edu!antaire.COM!grayShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,c2144e59db95b16e,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1991-11-22 03:38:01 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cis.ohio-state.edu!antaire.COM!gray From: gray@antaire.COM (Gray Watson) Newsgroups: gnu.gcc.help Subject: linking order... Message-ID: <9111220517.AA01215@antaire.com> Date: 22 Nov 91 05:17:00 GMT Sender: daemon@cis.ohio-state.edu Reply-To: Gray.Watson@antaire.com Distribution: gnu Organization: GNUs Not Usenet Lines: 38