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

            Bug ID: 18703
           Summary: Symbol version and Version script incompatibility with
                    BFD ld
           Product: binutils
           Version: 2.26 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gold
          Assignee: ccoutant at gmail dot com
          Reporter: tmsriram at google dot com
                CC: ian at airs dot com, iant at google dot com, ppluzhnikov at 
google dot com,
                    saugustine at google dot com
  Target Milestone: ---

Here is a simple example to reproduce the problem:

foo.cc
======

extern "C"
int foo() {
  return 0;
}

__asm__ (".symver foo, foo@VERS_1.1");


foo.map
=======

VERS_1.1 {
  global:
        foo;
};


Now, use BFD linker:

$ g++ -B<path to bfd linker> foo.cc -fPIC -shared
-Wl,--version-script=./foo.map -o libfoo.so

$ nm libfoo.so | grep foo
0000000000000700 T foo@VERS_1.1

The symbol is versioned.

Now, use gold linker and repeat:

$ g++ -B<path to gold linker> foo.cc -fPIC -shared
-Wl,--version-script=./foo.map -o libfoo.so

$ nm libfoo.so | grep foo
0000000000000740 T foo

The symbol is not versioned.

This affects building libgcc_s.so in trunk GCC with gold as symbol
__cpu_indicator_init is versioned in the exact manner as described.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to