[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Anyone try XF86-4.0 yet?



On Fri, 17 Mar 2000, W Bauske wrote:

> > > Try "ldd binary_name" on it. Probably missing some shared lib.
> > 
> > It was included in my post.  I've used nm and objdump to see that this
...
> Your initial post though shows you pointed ldd at a non-existent file.
> That's what the error message says anyway. You have to use the full path
> name.

That was not the problem in my case.  ldd will also report "No such file or
directory" on an application where the loader cannot be found.  So will
strace.  After developing code on Linux for many years, I have learned this
well.  Here is some proof:

(bryan/bryan.1@neptune) ~/tmp % vl extract*
-rwxr-xr-x   2 bryan    bryan      187824 Mar 17 17:50 extract*
-rwxr-xr-x   1 bryan    bryan      219664 Mar 16 02:39 extract.bad*

(bryan/bryan.1@neptune) ~/tmp % file !$
file extract*
extract:     ELF 64-bit LSB executable, Alpha (unofficial), version 1,
dynamically linked (uses shared libs), stripped
extract.bad: ELF 64-bit LSB executable, Alpha (unofficial), version 1,
dynamically linked (uses shared libs), stripped

(bryan/bryan.1@neptune) ~/tmp % ldd !$
ldd extract*
extract:
        libc.so.6.1 => /lib/libc.so.6.1 (0x000002000011e000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x0000020000000000)
extract.bad:
/usr/bin/ldd: ./extract.bad: No such file or directory

(bryan/bryan.1@neptune) ~/tmp % strace ./extract.bad
execve("./extract.bad", ["./extract.bad"], [/* 26 vars */]) = 0
strace: exec: No such file or directory

(bryan/bryan.1@neptune) ~/tmp % strace ./extract|&head -n 5
execve("./extract", ["./extract"], [/* 26 vars */]) = 0
brk(0)                                  = 0x12012fb20
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat(3, {st_mode=0, st_size=953355579, ...}) = 0

Here is the problem in the first binary:

(bryan/bryan.1@neptune) ~/tmp % strings extract|head -n2
/lib/ld-linux.so.2
libc.so.6.1

(bryan/bryan.1@neptune) ~/tmp % ^act^act.bad
strings extract.bad | head -n2
/lib/ld.so.1
__libc_init_first

-bp
--
# bryan at terran dot org
# http://www.terran.org/~bryan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []