Operating System - HP-UX
1837943 Members
4099 Online
110124 Solutions
New Discussion

'file' cannot diferenciate static executables from dynamic executables in HP-UX 11.23

 
SOLVED
Go to solution
Jdamian
Respected Contributor

'file' cannot diferenciate static executables from dynamic executables in HP-UX 11.23

Hi.

On my HP-UX 11iv2 on Itanium (HP-UX 11.23), "file" command shows the same description for statically executable object files and for dynamically executable object files (or non-shared from shared).

# file /sbin/ls /usr/bin/ls
/sbin/ls: ELF-32 executable object file - IA64
/usr/bin/ls: ELF-32 executable object file - IA64

The only way to distinguish ones from other is by means of ldd command:

ldd /usr/bin/ls /sbin/ls
libxcurses.so.1 => /usr/lib/hpux32/libxcurses.so.1
libc.so.1 => /usr/lib/hpux32/libc.so.1
libdl.so.1 => /usr/lib/hpux32/libdl.so.1
ldd: "/sbin/ls" is not a shared executable.

Is this behaviour due to an old release of /etc/magic ?

Thanx in advance
1 REPLY 1
Bill Hassell
Honored Contributor
Solution

Re: 'file' cannot diferenciate static executables from dynamic executables in HP-UX 11.23

Exactly...file works by magic (/etc/magic) and unless it has magic numbers for the various ELF features, only one value will be shown. The chatr command can also display the executable details.


Bill Hassell, sysadmin