bug-binutils
[Top][All Lists]
Advanced

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

[Bug gold/21215] New: Gold linker segfaults linking symbols with differe


From: shenhan at google dot com
Subject: [Bug gold/21215] New: Gold linker segfaults linking symbols with different versions.
Date: Fri, 03 Mar 2017 22:04:09 +0000

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

            Bug ID: 21215
           Summary: Gold linker segfaults linking symbols with different
                    versions.
           Product: binutils
           Version: 2.29 (HEAD)
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gold
          Assignee: ccoutant at gmail dot com
          Reporter: shenhan at google dot com
                CC: ian at airs dot com
  Target Milestone: ---

Gold linker segfaults linking symbols with different versions.

The scenarios is explained below:
We have a symbol "_ZNKSs11_M_disjunctEPKc", defined in 3 different places:
a) - "_ZNKSs11_M_disjunctEPKc" in libstdc++.a(string-inst.pic.o)
b) - "address@hidden" in compatibility.pic.o
c) - "_ZNKSs11_M_disjunctEPKc@@GLIBCXX_3.4.5" in compatibility.pic.o

And we link with a version script file - 
  GLIBCXX_3.4 {
    global:
      _ZNKSs11_M_disjunctEPKc;
  };

The problem we have is
1) - linker reads a), gets version "3.4" from version script file, thus it is
treated as "default_version".
2) - linker reads c), get version "3.4.5", also regarded as default version,
because of "@@".
3) - linker segfaults at Symbol::override_version.

We only circumvent this if linker processes symbols in the order of a) -> b) ->
c). However the order linker processes symbols is out of our control.

Is there an usage error - providing a default version in both version script
file and object file?

But anyway, the link segfaul should be fixed.

(I think the explanation is clear to identify the problem, if not, I'll reduce
what I have and provide a small test case)

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