bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/12975] New: --gc-sections doesn't remove symbols hidden with ver


From: mh-sourceware at glandium dot org
Subject: [Bug ld/12975] New: --gc-sections doesn't remove symbols hidden with version scripts
Date: Fri, 8 Jul 2011 17:47:58 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=12975

           Summary: --gc-sections doesn't remove symbols hidden with
                    version scripts
           Product: binutils
           Version: 2.21
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
        AssignedTo: address@hidden
        ReportedBy: address@hidden


(This applies to both ld and gold)

Take the following source code as test.c:
-----8<-----
int foo() { return 42; }

int bar() { return 0; }

#pragma GCC visibility push(hidden)
int baz() { return 1; }
#pragma GCC visibility pop
----->8-----

Take the following version script as ver:
-----8<-----
{
global:
  foo;
local:
  *;
};
----->8-----

Build with:
gcc -o test.so -shared test.c -Wl,--gc-sections -ffunction-sections
-Wl,--version-script,ver

The baz function, hidden with visibility, is removed from the resulting
test.so, but not bar, as one could expect, since it's effectively hidden
through the version script.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]