sps@mcnc.org (Stephen Schaefer) (01/05/90)
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