[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#331460: marked as done (gcc-4.0: Some uses of pragma GCC visibility with -fPIC still build position dependent code.)

Your message dated Sat, 6 May 2006 12:15:20 +0200
with message-id <17500.30520.572186.372957@gargle.gargle.HOWL>
and subject line Some uses of pragma GCC visibility with -fPIC still build position
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: gcc-4.0
Version: 4.0.2-2
Severity: important

Building the following code:
#pragma GCC visibility push(hidden)
#pragma GCC visibility push(default)
#include <string.h>
#pragma GCC visibility pop

__attribute__ ((visibility ("default"))) void Func() {
	char c[100];
	memset(c, 0, sizeof(c));
(yes, this is the same code as in bug #330279)

gives position dependent code:
mh@namakemono:~$ gcc -fPIC -shared -o test.so test.c
mh@namakemono:~$ objdump --private-headers test.so | grep TEXTREL
  TEXTREL     0x0

If you removing all pragmas in the source code, and build with
-fvisibility=hidden, you get:
mh@namakemono:~$ gcc -fPIC -shared -fvisibility=hidden -o test.so test-nopragma.c
mh@namakemono:~$ objdump --private-headers test.so | grep TEXTREL

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-1-686
Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8)

Versions of packages gcc-4.0 depends on:
ii  binutils             2.16.1cvs20050902-1 The GNU assembler, linker and bina
ii  cpp-4.0              4.0.2-2             The GNU C preprocessor
ii  gcc-4.0-base         4.0.2-2             The GNU Compiler Collection (base 
ii  libc6                2.3.5-6             GNU C Library: Shared libraries an
ii  libgcc1              1:4.0.2-2           GCC support library

Versions of packages gcc-4.0 recommends:
ii  libc6-dev                     2.3.5-6    GNU C Library: Development Librari
pn  libmudflap0-dev               <none>     (no description available)

-- no debconf information

--- End Message ---
--- Begin Message ---
Not reproducible anymore with 4.0.3 and 4.1.0 from unstable.

--- End Message ---

Reply to: