[Bug ld/11434] ld resolves relocations against STB_GNU_UNIQUE in DT_SYMBOLIC libraries

2010-03-26 Thread hjl dot tools at gmail dot com

--- Additional Comments From hjl dot tools at gmail dot com  2010-03-26 
15:02 ---
A patch with a testcase is posted at

http://sourceware.org/ml/binutils/2010-03/msg00395.html

-- 


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.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/11434] ld resolves relocations against STB_GNU_UNIQUE in DT_SYMBOLIC libraries

2010-03-26 Thread hjl dot tools at gmail dot com

--- Additional Comments From hjl dot tools at gmail dot com  2010-03-26 
13:42 ---
Created an attachment (id=4683)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4683&action=view)
An updated patch

We don't need to check unique_global for ifunc symbols.

-- 
   What|Removed |Added

Attachment #4682 is|0   |1
   obsolete||


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.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/11434] ld resolves relocations against STB_GNU_UNIQUE in DT_SYMBOLIC libraries

2010-03-26 Thread hjl dot tools at gmail dot com

--- Additional Comments From hjl dot tools at gmail dot com  2010-03-26 
13:36 ---
Created an attachment (id=4682)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4682&action=view)
A patch

Please try this patch.

-- 


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.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


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

2010-03-26 Thread jakub at redhat dot com
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.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils