From owner-freebsd-hackers Tue Feb 25 01:01:48 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id BAA11051 for hackers-outgoing; Tue, 25 Feb 1997 01:01:48 -0800 (PST) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id BAA11030 for ; Tue, 25 Feb 1997 01:01:43 -0800 (PST) Received: from murrow.prognet.com (prognet.com [205.219.198.1]) by who.cdrom.com (8.7.5/8.6.11) with SMTP id AAA11877 for ; Tue, 25 Feb 1997 00:30:42 -0800 (PST) Received: from peterh (two89.dev.prognet.com) by murrow.prognet.com with SMTP id AA20112 (5.67b/IDA-1.5 for ); Tue, 25 Feb 1997 00:31:06 -0800 Message-Id: <3.0.1.32.19970225003040.00ff58e4@prognet.com> X-Sender: peterh@prognet.com X-Mailer: Windows Eudora Pro Version 3.0.1 (32) Date: Tue, 25 Feb 1997 00:30:40 -0800 To: freebsd-hackers@freebsd.org From: Peter Haight Subject: Static variables in shared libraries Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk While I am doing this stuff on FreeBSD, this is not necessarily FreeBSD related, but I can't seem to find much shared library information on the Web. 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? Additionaly, does anyone know a good source of detailed information on the implementation of shared libraries on various platforms?