http://sourceware.org/bugzilla/show_bug.cgi?id=12548
--- Comment #14 from Igor Pashev <pashev.igor at gmail dot com> 2012-11-13
21:10:32 UTC ---
I think I've fixed this.
The root of the problem is equivalent to this version script:
========================= >8 ================
# "Builtin":
<base name> {
global:
_PROCEDURE_LINKAGE_TABLE_;
_edata;
...
}
# Real mapfile:
{
...
}
========================= 8< ================
So for anonymous version tag we just set base version: (See patch)
Test:
# cat test.c
int foo()
{
return 17;
}
const char *bar()
{
return "bar";
}
# cat map
{
global:
foo;
local:
bar;
};
# gcc -fpic -c test.c -o lib.o -O0
# ld/ld-new -o lib.so lib.o -shared --version-script=map
# objdump -T lib.so
lib.so: file format elf64-x86-64-sol2
DYNAMIC SYMBOL TABLE:
0000000000000294 l d .text 0000000000000000 .text
0000000000200308 g DO .dynamic 0000000000000000 _DYNAMIC
0000000000000000 g DO .text 0000000000000000 _PROCEDURE_LINKAGE_TABLE_
00000000002003b8 l DO .dynamic 0000000000000000 _END_
0000000000000294 l DO .text 0000000000000000 _START_
00000000002003b8 g D .dynamic 0000000000000000 __bss_start
0000000000000294 g DF .text 000000000000000b foo
00000000002003b8 g D .dynamic 0000000000000000 _edata
0000000000000000 g DO .dynamic 0000000000000000 _GLOBAL_OFFSET_TABLE_
00000000002003b8 g D .dynamic 0000000000000000 _end
--
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.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils