🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #2124

ld and libc.a on Sun 4.0.1

#2124
From: Stephen Schaefer
Date: Thu, 04 Jan 1990 17:38
23 lines
1438 bytes
Under Sun OS 4.0.1 on a Sun 4/110, libc.a contains unresolved
references to __GLOBAL_OFFSET_TABLE_ in the object getenv.o.  (I
surmise that the symbol has something to do with position independent
code, which in turn has to do with shared libraries.)  The native ld
removes that symbol from the final executable.  GNU ld reports it as
an unresolved reference and fails.

If I were only using gcc, I'd just use the native loader.

The native loader is apparently unacceptable for the purposes of g++.

My workaround for now is OOGLY: I copied the libc.a from a
sparcstation running 4.0.3c into /usr/local/std/lib/libc.a, which ld++
searches, and which the native ld does not search.  The Sun OS 4.0.3c
library does not refer to __GLOBAL_OFFSET_TABLE_, so I don't get the
unresolved reference error.  I guess I'm going to find out if the two
libraries are compatible.

If I could switch to pure Sun OS 4.0.3 I would.  Someday I will.
--
	Stephen P. Schaefer, Postmaster	MCNC
	sps@mcnc.org			P.O. Box 12889
	...!mcnc!sps			RTP, NC 27709
Technical Details
Message-ID: <SPS.90Jan4123819@pepe.mcnc.org>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!xanth!mcnc!sps

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!xanth!mcnc!sps
From: sps@mcnc.org (Stephen Schaefer)
Newsgroups: gnu.g++.bug
Subject: ld and libc.a on Sun 4.0.1
Message-ID: <SPS.90Jan4123819@pepe.mcnc.org>
Date: 4 Jan 90 17:38:19 GMT
Sender: daemon@mcnc.org
Distribution: gnu
Organization: Microelectronics Center of North Carolina
Lines: 23