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:
[hjl@gnu-tools-1 symbolic]$ cat bar.c
__attribute__((visibility("protected"))) int xxxxx;
void
bar ()
{
xxxxx = 30;
}
[hjl@gnu-tools-1 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
[hjl@gnu-tools-1 symbolic]$
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils