Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

shared library problem

tijoentijoen Member Posts: 141
Hi

I built a shared library and a teste.cpp that has nothing but a main
look when i try to build it:

[code][root@localhost tt]# g++ -o tt teste.cpp -linferno
/usr/bin/ld: tt: hidden symbol `__dso_handle' in /usr/lib/gcc/i386-redhat-linux/3.4.6/crtbegin.o is referenced by DSO
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
[/code]

the name of the library is inferno and the so file is copied in /usr/lib
if I take out the -linferno the application is built, but not if I add the lib link
inside teste.cpp there is only one main with nothing but a printf

when I use nm on the so library:

[code][root@localhost lib]# nm libinferno.so.1
U atoi@@GLIBC_2.0
0000d730 A __bss_start
U __cxa_atexit@@GLIBC_2.1.3
// The problem?!?
U __dso_handle
// -------------------------
0000d72c d DW.ref.__gxx_personality_v0
0000d5ec A _DYNAMIC
0000d730 A _edata
0000d73c A _end
U exit@@GLIBC_2.0
...
[/code]

I don't know what to do...
any help pleeeeeeease?

Joe

Comments

  • gustavosserragustavosserra Member Posts: 201
    Hi, I think that the inferno so was built with a very old glibc, in this case, 2.0. You must be building your test with gcc 3.xx and glibc 2.3. You should get a newer build of the inferno lib.

    : Hi
    :
    : I built a shared library and a teste.cpp that has nothing but a main
    : look when i try to build it:
    :
    : [code]: [root@localhost tt]# g++ -o tt teste.cpp -linferno
    : /usr/bin/ld: tt: hidden symbol `__dso_handle' in /usr/lib/gcc/i386-redhat-linux/3.4.6/crtbegin.o is referenced by DSO
    : /usr/bin/ld: final link failed: Nonrepresentable section on output
    : collect2: ld returned 1 exit status
    : [/code]:
    :
    : the name of the library is inferno and the so file is copied in
    : /usr/lib
    : if I take out the -linferno the application is built, but not if I
    : add the lib link
    : inside teste.cpp there is only one main with nothing but a printf
    :
    : when I use nm on the so library:
    :
    : [code]: [root@localhost lib]# nm libinferno.so.1
    : U atoi@@GLIBC_2.0
    : 0000d730 A __bss_start
    : U __cxa_atexit@@GLIBC_2.1.3
    : // The problem?!?
    : U __dso_handle
    : // -------------------------
    : 0000d72c d DW.ref.__gxx_personality_v0
    : 0000d5ec A _DYNAMIC
    : 0000d730 A _edata
    : 0000d73c A _end
    : U exit@@GLIBC_2.0
    : ...
    : [/code]:
    :
    : I don't know what to do...
    : any help pleeeeeeease?
    :
    : Joe
Sign In or Register to comment.