bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/18329] New: Turn off PROTECTED visibility with -Bsymbolic


From: hjl.tools at gmail dot com
Subject: [Bug ld/18329] New: Turn off PROTECTED visibility with -Bsymbolic
Date: Sat, 25 Apr 2015 17:59:02 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=18329

            Bug ID: 18329
           Summary: Turn off PROTECTED visibility with -Bsymbolic
           Product: binutils
           Version: 2.26 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: hjl.tools at gmail dot com

-Bsymbolic binds global references locally at link-time.
There is no need for PROTECTED visibility which may have
overhead at run-time:

address@hidden symbolic]$ cat bar.c 
__attribute__((visibility("protected"))) int xxxxx;

void
bar ()
{
  xxxxx = 30;
}
address@hidden symbolic]$ make
gcc  -m32 -fPIC   -c -o bar.o bar.c
./ld -m elf_i386 -Bsymbolic -shared -o libbar.so bar.o
readelf -sW libbar.so | grep xxxx
     1: 0000123c     4 OBJECT  GLOBAL PROTECTED    8 xxxxx
    15: 0000123c     4 OBJECT  GLOBAL PROTECTED    8 xxxxx
address@hidden symbolic]$

-- 
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]