Re: ldd

From: <seanc_at_no.spam.please>
Date: Tue Mar 27 2007 - 11:46:02 CST

On Mon, Mar 26, 2007 at 04:45:32PM -0600, Mike Wilson wrote:
> seanc@unixgeeks.ca wrote:
> >I'm not 100% sure about that. Check what 'file' says about the file.
> >I've noticed that ldd will report 'not a dynamic executable' when it is
> >run on a file it doesn't recognize.
> >
> >
> Indeed. Here's what 'file' says:
>
> /usr/share/PGS5-0-2-12/PageStream5: ELF 32-bit LSB executable, Intel
> 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses
> shared libs), for GNU/Linux 2.2.5, stripped
>
> Any thoughts on where to go from here, given that this program runs
> happily on my other, 32-bit Ubuntu 6.10, system?

If you think you might be missing a library, you can try using objdump
to figure out what you're missing. It should be able to figure it out
even with the different binary formats. I can do it with the i386 FC4
objdump running on MIPS execuatbles here. The library used by a symbol
is shown in the 6th column. Here's a small example (heavily trimmed...
objdump gives you a lot of info!) that uses the acl and glibc libraries:

[vonda bin]$ uname -a
Linux vonda 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 i686 i686
i386 GNU/Linux
[vonda bin]$ file getfacl
getfacl: ELF 32-bit LSB MIPS-I executable, MIPS, version 1 (SYSV), for
GNU/Linux 2.4.3, dynamically linked (uses shared libs), stripped
[vonda bin]$ objdump -T getfacl

getfacl: file format elf32-little

DYNAMIC SYMBOL TABLE:
10000020 g D .data 00000000 Base _fdata
10008160 g d *ABS* 00000000 _gp_disp
...
10000000 g D *ABS* 00000000 Base __init_array_start
00404ad0 DF *UND* 0000038c ACL_1.0 acl_get_file
00000000 DO *UND* 00000004 GLIBC_2.0 stdin
...
004049a0 DF *UND* 0000018c ACL_1.0 acl_free
00404990 DF *UND* 00000094 GLIBC_2.3.3 nftw64
...
Received on Tue Mar 27 11:46:08 2007

This archive was generated by hypermail 2.1.8 : Tue Mar 27 2007 - 11:46:13 CST