Summary: Running a binary loaded elsewhere

From: Daniel Clar <Daniel.Clar_at_supelec.fr>
Date: Wed, 29 Mar 2000 13:28:55 +0200

The question was :
>
> Hello Managers,
>
> I've got a binary file compiled and loaded on the same operating system
> version.
>
> When I try to run this binary, I've the following error messages :
>
> 439:filename: /sbin/loader: Error: unresolvable symbol in filename:
> _OtsDivide64
> and the same thing with
> _OtsDivide32
> _OtsDivide64Unsigned
> _OtsRemainder64Unsigned
> _OtsDivide32Unsigned
> _OtsMove
> _OtsRemainder32Unsigned
>
> The libots.so file is, in my opinion, at the right place :
>
> # ls -l /usr/shlib/libots.so
> lrwxr-xr-x 1 root system 35 Dec 14 1995 /usr/shlib/libots.so
> -> ../ccs/lib/cmplrs/otabase/libots.so
> # ls -l /usr/ccs/lib/cmplrs/otabase/libots.so
> -rw-r--r-- 1 bin bin 147456 Jul 25 1995 /usr/ccs/lib/cmplrs/
> otabase/libots.so
>
> How to resolve without the sources ?
>
> Thank you in advance,
>
> Daniel Clar
> Computer Operations Manager
> Supelec
> France

I've got several answers. Thank you to everybody. I'll give some of
them:

Knut Hellebų <Knut.Hellebo_at_nho.hydro.com>

You can check the liblist by doing a 'odump -Dl' on the file. This way
you can see which libraries the program depends on.


"Serguei Patchkovskii" <patchkov_at_ucalgary.ca>

A good place to start would be the manual page for loader(5).
I would start by setting _RLD_ARGS to '-v -log /tmp/xxx', and
work from that ...


"Frank Wortner" <frank_at_bondnet.com>
The functions you mention are (or should be) defined in libc.so, not
libots.so -- at least that's the way it is on my machines.

Try doing a

nm -gAB | grep OtsDivide64

on both systems You should see this line (amoung others)

libc.so: 0x0003ff801b0960 T _OtsDivide64

The "T" means that this is a global "text" symbol -- probably a function
entry point -- and it is defined in libc.so.


Joe Mario <mario_at_zk3.dec.com>

You don't say how you're linking your application or what
        versions of the operating system you're running on, but here
        is what I can figure out.

        As of V4.0, all the _Ots* routines your mail reports as missing
        are part of libc.so. Prior to V4.0, those routines were
delivered
        in libots.so. As of V4.0, those routines were moved
from libots.so into libc.so.

        In the absence of seeing how your application was linked,
        if you're running on a release which is earlier than V4.0,
        you can do the following to get your application running:

                setenv _RLD_LIST /usr/shlib/libots.so:DEFAULT

        If you're on V4.0, or greater and your application is not
        linked with libc.so, point _RLD_LIST at libc.so instead.

        The above environment variable will cause the loader to first
        search the mentioned library before doing it's default search.



Finally, I've got the sources and succeed to recompile without problem.

Daniel
Received on Wed Mar 29 2000 - 11:28:31 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:40 NZDT