From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1647 invoked by alias); 11 May 2008 09:19:11 -0000 Received: (qmail 1407 invoked by uid 48); 11 May 2008 09:18:30 -0000 Date: Sun, 11 May 2008 09:19:00 -0000 Message-ID: <20080511091830.1406.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libstdc++/36022] stl templates exported as weak symbols though visibility hidden is used In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "mh+gcc at glandium dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-05/txt/msg00840.txt.bz2 ------- Comment #2 from mh+gcc at glandium dot org 2008-05-11 09:18 ------- Usually, when you're using visibility hidden, that means you want to avoid exporting a lot of cruft symbols from a shared library... that the std:: namespace is always visibility default is an annoyance. Especially considering the set of exported symbols change with optimization, since some of these might end up inlined: $ g++-4.3 -O3 -shared -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -o foo.so foo.cpp $ objdump -T -C foo.so | grep std 0000000000000780 w DF .text 00000000000002fe Base void std::__introsort_loop(int*, int*, long) $ g++-4.3 -O2 -shared -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -o foo.so foo.cpp $ objdump -T -C foo.so | grep std 0000000000000a40 w DF .text 00000000000000a6 Base void std::__insertion_sort(int*, int*) 00000000000008d0 w DF .text 0000000000000161 Base void std::__introsort_loop(int*, int*, long) 00000000000007e0 w DF .text 00000000000000eb Base void std::__adjust_heap(int*, long, long, int) $ g++-4.3 -O1 -shared -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -o foo.so foo.cpp $ objdump -T -C foo.so | grep std 0000000000000c65 w DF .text 0000000000000063 Base void std::make_heap(int*, int*) 0000000000000ee0 w DF .text 0000000000000051 Base void std::__final_insertion_sort(int*, int*) 0000000000000b52 w DF .text 0000000000000024 Base void std::__unguarded_linear_insert(int*, int) 0000000000000b76 w DF .text 0000000000000053 Base void std::__push_heap(int*, long, long, int) 0000000000000b10 w DF .text 0000000000000042 Base int* std::__unguarded_partition(int*, int*, int) 0000000000000d21 w DF .text 0000000000000053 Base void std::sort_heap(int*, int*) 0000000000000cc8 w DF .text 0000000000000059 Base void std::__heap_select(int*, int*, int*) 0000000000000e72 w DF .text 000000000000006a Base void std::__insertion_sort(int*, int*) 0000000000000d80 w DF .text 00000000000000f2 Base void std::__introsort_loop(int*, int*, long) 0000000000000bc9 w DF .text 000000000000009c Base void std::__adjust_heap(int*, long, long, int) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36022