[Bug ld/815] [C-api -> C++ lib] undefined symbol _Unwind*

2005-04-02 Thread pluto at pld-linux dot org


-- 
   What|Removed |Added

Summary|[C-api -> C++ lib] undefined|[C-api -> C++ lib] undefined
   |symbol _Unwind* |symbol _Unwind*
   |http://sources.redhat.com/bu|
   |gzilla/enter_bug.cgi|


http://sources.redhat.com/bugzilla/show_bug.cgi?id=815

--- 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/815] New: [C-api -> C++ lib] undefined symbol _Unwind* http://sources.redhat.com/bugzilla/enter_bug.cgi

2005-04-02 Thread pluto at pld-linux dot org
# cat foo.h  
struct foo { bool check() const; };  
  
# cat foo.cpp  
#include "foo.h"  
bool foo::check() const { return true; }  
  
# cat foo-c.cpp  
#include "foo.h"  
extern "C" int foo_check(const foo* obj) { return obj->check(); } 
 
# build 
g++ -O2 foo.cpp -o libfoo.so -shared 
g++ -O2 foo-c.cpp -o libfoo-c.so -shared -L. -lfoo 
# link test 
gcc libfoo.so 
LD_LIBRARY_PATH=./ gcc libfoo-c.so 
 
# with binutils-2.15.94* it works fine 
 
2x: 
 
/usr/lib/gcc/i686-pld-linux/4.0.0/../../../crt1.o(.text+0x18): 
In function `_start': init.c: undefined reference to `main' 
collect2: ld returned 1 exit status 
 
# LD_LIBRARY_PATH=. ldd libfoo*.so 
libfoo-c.so: 
linux-gate.so.1 =>  (0xe000) 
libfoo.so => ./libfoo.so (0x40002000) 
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x40004000) 
libm.so.6 => /lib/libm.so.6 (0x400d4000) 
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x400f8000) 
libc.so.6 => /lib/libc.so.6 (0x40103000) 
/lib/ld-linux.so.2 (0x8000) 
libfoo.so: 
linux-gate.so.1 =>  (0xe000) 
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x40002000) 
libm.so.6 => /lib/libm.so.6 (0x400d2000) 
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x400f6000) 
libc.so.6 => /lib/libc.so.6 (0x40101000) 
/lib/ld-linux.so.2 (0x8000) 
 
# with binutils snapshot it doesn't work 
(ftp://sources.redhat.com/pub/binutils/snapshots2.15.96) 
 
2x: 
 
/usr/lib/gcc/i686-pld-linux/4.0.0/../../../crt1.o: 
In function `_start': 
init.c:(.text+0x18): undefined reference to `main' 
/usr/bin/../lib/libstdc++.so.6: 
undefined reference to [EMAIL PROTECTED]' 
/usr/bin/../lib/libstdc++.so.6: 
undefined reference to [EMAIL PROTECTED]' 
/usr/bin/../lib/libstdc++.so.6: 
undefined reference to [EMAIL PROTECTED]' 
/usr/bin/../lib/libstdc++.so.6: 
undefined reference to [EMAIL PROTECTED]' 
/usr/bin/../lib/libstdc++.so.6: 
undefined reference to [EMAIL PROTECTED]' 
/usr/bin/../lib/libstdc++.so.6: 
undefined reference to [EMAIL PROTECTED]' 
/usr/bin/../lib/libstdc++.so.6: 
undefined reference to [EMAIL PROTECTED]' 
/usr/bin/../lib/libstdc++.so.6: 
undefined reference to [EMAIL PROTECTED]' 
/usr/bin/../lib/libstdc++.so.6: 
undefined reference to [EMAIL PROTECTED]' 
/usr/bin/../lib/libstdc++.so.6: 
undefined reference to [EMAIL PROTECTED]' 
/usr/bin/../lib/libstdc++.so.6: 
undefined reference to [EMAIL PROTECTED]' 
collect2: ld returned 1 exit status 
 
# LD_LIBRARY_PATH=. ldd libfoo*.so 
libfoo-c.so: 
linux-gate.so.1 =>  (0xe000) 
libfoo.so => ./libfoo.so (0x40002000) 
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x40004000) 
libm.so.6 => /lib/libm.so.6 (0x400d4000) 
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x400f8000) 
libc.so.6 => /lib/libc.so.6 (0x40103000) 
/lib/ld-linux.so.2 (0x8000) 
libfoo.so: 
linux-gate.so.1 =>  (0xe000) 
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x40002000) 
libm.so.6 => /lib/libm.so.6 (0x400d2000) 
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x400f6000) 
libc.so.6 => /lib/libc.so.6 (0x40101000) 
/lib/ld-linux.so.2 (0x8000) 
 
Do I need add the -lstdc++ to link similiar C-apis now?

-- 
   Summary: [C-api -> C++ lib] undefined symbol _Unwind*
http://sources.redhat.com/bugzilla/enter_bug.cgi
   Product: binutils
   Version: 2.15
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: pluto at pld-linux dot org
CC: bug-binutils at gnu dot org
 GCC build triplet: i686-pld-linux
  GCC host triplet: i686-pld-linux
GCC target triplet: i686-pld-linux


http://sources.redhat.com/bugzilla/show_bug.cgi?id=815

--- 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/815] [C-api -> C++ lib] undefined symbol _Unwind*

2005-04-02 Thread mmazur at kernel dot pl


-- 
   What|Removed |Added

 CC||mmazur at kernel dot pl


http://sources.redhat.com/bugzilla/show_bug.cgi?id=815

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


Re: Binutils build broken at FreeBSD 5.3 after -Werror enabling

2005-04-02 Thread Vladimir Merzliakov
The attached patch should solve all of these, I hope.  Please could you 
test it.  (I have also attached the regenerated configure files for you).
I build and install binutils with patches without any problems!
Thank you for fixing getopt problem at FreeBSD.
Vladimir

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