From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10699 invoked by alias); 20 Aug 2008 20:24:12 -0000 Received: (qmail 10690 invoked by uid 22791); 20 Aug 2008 20:24:11 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 20 Aug 2008 20:23:14 +0000 Received: from spaceape8.eur.corp.google.com (spaceape8.eur.corp.google.com [172.28.16.142]) by smtp-out.google.com with ESMTP id m7KKN7Du024154; Wed, 20 Aug 2008 21:23:07 +0100 Received: from localhost.localdomain.google.com (dhcp-172-18-118-203.corp.google.com [172.18.118.203]) (authenticated bits=0) by spaceape8.eur.corp.google.com with ESMTP id m7KKN3M7011447 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 20 Aug 2008 13:23:06 -0700 To: Arindam Cc: gcc-help@gcc.gnu.org Subject: Re: Restricting symbol binding within shared object References: From: Ian Lance Taylor Date: Thu, 21 Aug 2008 04:43:00 -0000 In-Reply-To: (Arindam's message of "Thu\, 21 Aug 2008 01\:00\:34 +0530") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-08/txt/msg00206.txt.bz2 Arindam writes: >> With a newer version of gcc you can use visibility attributes. That >> is probably your best approach here. >> >> http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Function-Attributes.html#Function-Attributes >> >> search for >> visibility ("visibility_type") >> > > Cool ... so this mimics the Windows __declspec(dllexport) kind of > declarations. I know that newer versions of Sun Studio have > essentially the same functionality (albeit with a less obnoxious > syntax). I need to figure out if aCC on HP-UX has something similar > too. Is this a new thing on ELF format? It works for Mach-O (used on Mac OS) as well. Ian