undefined symbol: __dso_handle

2005-03-29 Thread grégory sainton


Hi, 

I am trying to built a shared library. 
During the compilation, everything is fine. 

But the execution of the program give :

./tutorial.exe: symbol lookup error:
/usr/lib/libthreadcpp.so: undefined symbol:
__dso_handle

I heared that is could come from the version of
binutils i am using.

Do you have any idea of the problem ? Do you have the
solution of my problem ?

Cheers,
Greg


Details of compilations 

g++ -fPIC -Wall -ansi -c Consumer.cpp
g++ -fPIC -Wall -ansi -c Mutex.cpp
g++ -fPIC -Wall -ansi -c Producer.cpp
g++ -fPIC -Wall -ansi -c Thread.cpp
g++ -shared -Wl  -o libthreadcpp.so  Consumer.o
Mutex.o Producer.o Thread.o


gcc tutorial6.o -L./CppMultiThreading -lpthread
-lthreadcpp -o tutorial.exe

[EMAIL PROTECTED] 3S-project-thread]$ g++ -v
Lecture des spécification à partir de
/usr/lib/gcc/i386-redhat-linux/3.4.2/specs
Configuré avec: ../configure --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--enable-shared --enable-threads=posix
--disable-checking --with-system-zlib
--enable-__cxa_atexit --disable-libunwind-exceptions
--enable-java-awt=gtk --host=i386-redhat-linux
Modèle de thread: posix
version gcc 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)

I am currently using the gcc given by Redhat Fedora
Core 3.



___
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-03-29 Thread Nick Clifton
Hi Vladimir,
Results of testting:

And then configure part work fine at FreeBSD but
binutils/config.h not #included in addr2line.c
Hmm, but it does #include "bucomm.h" which then #include's "config.h". 
It turns out however that it incldues it too late (ie after "bfd.h"). 
So please try the attached patch (in addition to my previous patch).

Cheers
  Nick
Index: binutils/addr2line.c
===
RCS file: /cvs/src/src/binutils/addr2line.c,v
retrieving revision 1.21
diff -c -3 -p -r1.21 addr2line.c
*** binutils/addr2line.c15 Jun 2004 01:19:13 -  1.21
--- binutils/addr2line.c29 Mar 2005 15:33:56 -
***
*** 29,34 
--- 29,35 
 both forms write results to stdout, the second form reads addresses
 to be converted from stdin.  */
  
+ #include "config.h"
  #include 
  
  #include "bfd.h"
___
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-03-29 Thread Vladimir Merzliakov
And then configure part work fine at FreeBSD but
binutils/config.h not #included in addr2line.c
Hmm, but it does #include "bucomm.h" which then #include's "config.h".
It turns out however that it incldues it too late (ie after "bfd.h").
So please try the attached patch (in addition to my previous patch).
addr2line.c compile with addition patch
But terminated at:
In file included from 
/usr/home/wanderer/pkg/build/binutils/src/src/gas/as.h:93,
from 
/usr/home/wanderer/pkg/build/binutils/src/src/gas/app.c:30:
/usr/home/wanderer/pkg/build/binutils/src/src/gas/../include/getopt.h:116: 
warning: function declaration isn't a prototype
gmake[3]: *** [app.o] Error 1

I rebuild binutils with --disable-werror flag and found in build log more 
warnings at gas/as.h:93 line in gas/*.c files

Also 4 warning in another *.c files:
In file included from 
/usr/home/wanderer/pkg/build/binutils/src/src/ld/lexsup.c:29:
/usr/home/wanderer/pkg/build/binutils/src/src/ld/../include/getopt.h:116: 
warning: function declaration isn't a prototype

In file included from 
/usr/home/wanderer/pkg/build/binutils/src/src/ld/ldemul.c:25:
/usr/home/wanderer/pkg/build/binutils/src/src/ld/../include/getopt.h:116: 
warning: function declaration isn't a prototype

In file included from eelf_i386_fbsd.c:31:
/usr/home/wanderer/pkg/build/binutils/src/src/ld/../include/getopt.h:116: 
warning: function declaration isn't a prototype

In file included from eelf_i386.c:31:
/usr/home/wanderer/pkg/build/binutils/src/src/ld/../include/getopt.h:116: 
warning: function declaration isn't a prototype

I think after fixing this warnings binutils must buld at FreeBSD 
without --disable-werror option

Vladimir

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


Re: Unix "time" returns 43.833s. "gprof" returns 438 seconds.

2005-03-29 Thread Nick Clifton
Hi Jason,
Unix "time" returns 43.833s. gprof returns 438 seconds. Either I'm going
crazy or gprof is reporting a 10x increase? What could be causing this?
A bug of some kind.  Presumably in gprof.
user0m43.646s

Each sample counts as 0.01 seconds.
  %   cumulative   self  self total
 time   seconds   secondscalls   s/call   s/call  name
 87.46381.78   381.78  256 1.49 1.49  readMB
 12.95438.3256.53  256 0.22 0.22  writeMB
Suppose that gprof had the wrong period for the sample.  Suppose for 
example that each sample counted as 0.06 seconds.  Then we can deduce 
that the actual cumulative time in seconds would be:

   438.32 * 6 = 2629.92 seconds
or
   2629.92 / 60 = 43.83 minutes
Which is pretty much what you are expecting yes ?
Cheers
  Nick


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


Re: [Bug ld/805] New: linking error: cannot handle R_MEM_INDIRECT reloc when using symbolsrec output

2005-03-29 Thread Nick Clifton
Hi dorchen1611,
On creating a .lx File for hms-8300 microprocessor (Lego robot) following linker
error occurs:
cannot handle R_MEM_INDIRECT reloc when using symbolsrec output.
Please could you supply a *small* self-contained test case that 
reproduces this problems and instructions on how to run the test case ?

Cheers
  Nick

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


Re: Fix typo in dwarf2.c and remove some dead code

2005-03-29 Thread Nick Clifton
Hi Fred,
2005-03-24  Fred Fish  <[EMAIL PROTECTED]>
* dwarf2.c (struct comp_unit): Fix typo.
(scan_unit_for_functions): Remove unused local variable "name"
and dead code that set it.
Approved - please apply.
Cheers
  Nick

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


[Bug ld/805] linking error: cannot handle R_MEM_INDIRECT reloc when using symbolsrec output

2005-03-29 Thread nickc at redhat dot com

--- Additional Comments From nickc at redhat dot com  2005-03-29 17:48 
---
Subject: Re:  New: linking error: cannot handle R_MEM_INDIRECT
 reloc  when using symbolsrec output

Hi dorchen1611,

> On creating a .lx File for hms-8300 microprocessor (Lego robot) following 
> linker
> error occurs:
> 
> cannot handle R_MEM_INDIRECT reloc when using symbolsrec output.

Please could you supply a *small* self-contained test case that 
reproduces this problems and instructions on how to run the test case ?

Cheers
   Nick




-- 


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

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


non-const variable from shared library gets placed in read-only section

2005-03-29 Thread Norton Allen
Problem:
  non-const variable exported from shared library gets placed in
  read-only section.
Environment:
  cygwin 1.3.15
  gcc 3.3.1, 3.3.3 and 3.4.1
  ld 2.15.94
  libxml2-2.6.18
  scrollkeeper-0.3.14
Details:
  The variable xmlFree is defined in libxml2 and referenced by a
  program in the scrollkeeper distribution.
  After preprocessing the scrollkeeper source, the pertinent definitions
  are:
typedef void ( *xmlFreeFunc)(void *mem);
extern xmlFreeFunc xmlFree;
  so xmlFree is a function pointer (and is *not* declared to
  be const). In the libxml libraries, xmlFree shows up in
  the writable data segment:
Cygwin> nm /bin/cygxml2-2.dll | grep 'xmlFree$'
100df1b0 D _xmlFree
Cygwin> nm /usr/lib/libxml2.dll.a | grep 'xmlFree$'
 I __imp__xmlFree
 I __nm__xmlFree
Cygwin> nm /usr/lib/libxml2.a | grep '^[^ ].*xmlFree$'
 D _xmlFree
  But in the executable, xmlFree shows up in the read-only
  .text section:
Cygwin> objdump -h scrollkeeper-tree-separate.exe
scrollkeeper-tree-separate.exe: file format pei-i386
Sections:
Idx Name  Size  VMA   LMA   File off  Algn
  0 .text 1db4  00401000  00401000  0400  2**4
  CONTENTS, ALLOC, LOAD, READONLY, CODE, DATA
  1 .data 0010  00403000  00403000  2200  2**4
  CONTENTS, ALLOC, LOAD, DATA
  2 .bss  0080  00404000  00404000    2**4
  ALLOC
  3 .idata06b0  00405000  00405000  2400  2**2
  CONTENTS, ALLOC, LOAD, DATA
  4 .stab 31f8  00406000  00406000  2c00  2**2
  CONTENTS, READONLY, DEBUGGING, NEVER_LOAD, EXCLUDE
  5 .stabstr  e36f  0040a000  0040a000  5e00  2**0
  CONTENTS, READONLY, DEBUGGING, NEVER_LOAD, EXCLUDE
Cygwin> grep 'xmlFree$' sk.map
  0x00402480_xmlFree
  0x00405184__imp__xmlFree
The problem does not occur when linking against the static library.
Can anyone hazard a guess as to what is going on?
-Norton Allen
begin:vcard
fn:Norton Allen
n:Allen;Norton
org:Harvard University;Anderson Group, DEAS/CCB
adr;dom:;;12 Oxford St.;Cambridge;MA;02138
email;internet:[EMAIL PROTECTED]
title:Software Engineer
tel;work:617-495-5922
x-mozilla-html:FALSE
url:http://www.arp.harvard.edu/
version:2.1
end:vcard

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