bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/11434] New: ld resolves relocations against STB_GNU_UNIQUE in DT


From: jakub at redhat dot com
Subject: [Bug ld/11434] New: ld resolves relocations against STB_GNU_UNIQUE in DT_SYMBOLIC libraries
Date: 26 Mar 2010 07:15:19 -0000

int i;
static int * g(void)
{
  return &i;
}
struct S {
  static int * f(void)
  {
    static int *p = g();
    return p;
  }
};

int * wrap2_f (void)
{
  return S::f();
}

g++ -O2 -fpic -shared -o lib.so lib.cc -Wl,-Bsymbolic
(assuming gcc has been configured to use STB_GNU_UNIQUE).
There are no relocations against _ZZN1S1fEvE1p (STB_GNU_UNIQUE) symbol defined
in this library.  While for non-STB_GNU_UNIQUE symbols that's desirable, the
symbol will always resolve to the containing library, for STB_GNU_UNIQUE it
causes the symbol to be no longer unique in the whole program.

-- 
           Summary: ld resolves relocations against STB_GNU_UNIQUE in
                    DT_SYMBOLIC libraries
           Product: binutils
           Version: 2.21 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: jakub at redhat dot com
                CC: bug-binutils at gnu dot org,hjl dot tools at gmail dot
                    com


http://sourceware.org/bugzilla/show_bug.cgi?id=11434

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]