From owner-freebsd-hackers Tue Feb 25 08:48:47 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id IAA01580 for hackers-outgoing; Tue, 25 Feb 1997 08:48:47 -0800 (PST) Received: from chai.plexuscom.com (chai.plexuscom.com [207.87.46.100]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id IAA01575 for ; Tue, 25 Feb 1997 08:48:41 -0800 (PST) Received: from chai.plexuscom.com (localhost [127.0.0.1]) by chai.plexuscom.com (8.8.5/8.6.12) with ESMTP id LAA01376; Tue, 25 Feb 1997 11:50:22 -0500 (EST) Message-Id: <199702251650.LAA01376@chai.plexuscom.com> To: Peter Haight Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Static variables in shared libraries In-reply-to: Your message of "Tue, 25 Feb 1997 00:30:40 PST." <3.0.1.32.19970225003040.00ff58e4@prognet.com> Date: Tue, 25 Feb 1997 11:50:21 -0500 From: Bakul Shah Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > I have a shared library which has the following definitions: > > const char* test_3 = "hello"; > const char* test_4 = test_3; > > If I dynamically load this shared library in my program and print the > variables, I get: > test_3 = "hello" > test_4 = 0x0 > > What's going on? May be shlib linking is broken? > Additionaly, does anyone know a good source of detailed information on the > implementation of shared libraries on various platforms? Other than reading code and man pages, you may want to check out old usenix conference proceedings. Try www.usenix.org to look up which proceedings (if you are a member you can pull off papers). The UW library may also have them. -- bakul