Operating System - HP-UX
1833207 Members
3121 Online
110051 Solutions
New Discussion

/usr/lib/dld.sl: Exec format error

 

/usr/lib/dld.sl: Exec format error

On one of the HP UX11i server, when we execute the command
export SHLIB_PATH=/usr/lib/pa20_64:$SHLIB_PATH
and then execute
ldd
we get the following error message:
/usr/lib/dld.sl: Bad magic number for shared library: /usr/lib/pa20_64/libc.2
/usr/lib/dld.sl: Exec format error

However, if we execute the command
export SHLIB_PATH=/usr/lib:$SHLIB_PATH
and then execute
ldd
we get the following:
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/informix/lib/esql/libifglx.sl => /usr/informix/lib/esql/libifglxl
/usr/lib/libM.1 => /usr/lib/libM.1
/usr/lib/libsec.2 => /usr/lib/libsec.2
/usr/lib/libm.2 => /usr/lib/libm.2
/usr/lib/libcl.2 => /usr/lib/libcl.2
/usr/lib/libisamstub.1 => /usr/lib/libisamstub.1
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libcl.1 => /usr/lib/libcl.1
/usr/lib/libisamstub.1 => /usr/lib/libisamstub.1
/usr/lib/libdld.1 => /usr/lib/libdld.1
/usr/lib/libnsl_s.2 => /usr/lib/libnsl_s.2
/usr/informix/lib/esql/libifgls.sl => /usr/informix/lib/esql/libifglsl
/usr/informix/lib/esql/libifos.sl => /usr/informix/lib/esql/libifos.l
/usr/informix/lib/esql/libifgen.sl => /usr/informix/lib/esql/libifgenl
/usr/informix/lib/libifasf.sl => /usr/informix/lib/libifasf.sl
/usr/informix/lib/esql/libifsql.sl => /usr/informix/lib/esql/libifsqll
/usr/lib/libm.2 => /usr/lib/libm.2
/appl/sp/lib/libgenitem.sl => /appl/sp/lib/libgenitem.sl
/appl/sp/lib/libdoc.sl => /appl/sp/lib/libdoc.sl
/appl/sp/lib/libclient.sl => /appl/sp/lib/libclient.sl
/appl/sp/lib/libgiui.sl => /appl/sp/lib/libgiui.sl
/appl/sp/lib/liblogui.sl => /appl/sp/lib/liblogui.sl
../ts_lib/libclient.sl => /appl/sp/lib/libclient.sl
/appl/sp/lib/libuniconv.sl => /appl/sp/lib/libuniconv.sl

Does this signify that the libc.2 library present in /usr/lib/pa20_64 is corrupted? If not, then what is the reason for the bad magic error? Kindly clarify
It Has Been...
2 REPLIES 2
Steve Steel
Honored Contributor

Re: /usr/lib/dld.sl: Exec format error

Hi



You need to
export or setenv LPATH to /usr/lib/pa20_64


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
ranganath ramachandra
Esteemed Contributor

Re: /usr/lib/dld.sl: Exec format error

the problem is you are running ldd on a PA32 executable, the dld found libc.2 in /usr/lib/pa20_64 first and saw that it is not good for a PA32 executable.

use SHLIB_PATH for specifying PA32 shared library lookup paths and LD_LIBRARY_PATH for PA64 shared library lookup paths.

it is better not to include the standard library lookup paths (/usr/lib for PA32 and /usr/lib/pa20_64 for PA64) in these variables.
 
--
ranga
hp-ux 11i v3[i work for hpe]

Accept or Kudo