This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/13134] New: Visibility attribute is ignored
- From: "bryner at brianryner dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Nov 2003 00:57:52 -0000
- Subject: [Bug c/13134] New: Visibility attribute is ignored
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The change to visibility handling that was checked in on Nov 6 seems to have
broken visibility pretty badly. Setting the visibility attribute on a C
function declaration no longer causes the function to be emitted with the given
visibility.
To reproduce this, compile the attached testcase:
gcc -c -o visibility.o visibility.c
and check the output with readelf:
readelf -s visibility.o
It will show visibility DEFAULT for all of the functions in this object file:
7: 00000000 5 FUNC GLOBAL DEFAULT 1 func1
8: 00000005 5 FUNC GLOBAL DEFAULT 1 func2
9: 0000000a 5 FUNC GLOBAL DEFAULT 1 func3
10: 0000000f 5 FUNC GLOBAL DEFAULT 1 func4
11: 00000014 5 FUNC GLOBAL DEFAULT 1 func5
12: 00000019 5 FUNC GLOBAL DEFAULT 1 func6
13: 0000001e 5 FUNC GLOBAL DEFAULT 1 func7
14: 00000023 5 FUNC GLOBAL DEFAULT 1 func8
--
Summary: Visibility attribute is ignored
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bryner at brianryner dot com
CC: austern at apple dot com,gcc-bugs at gcc dot gnu dot org
GCC host triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13134