Operating System - HP-UX
1830477 Members
2434 Online
110005 Solutions
New Discussion

dld.sl: Bad magic number for shared

 
sunil_7
Occasional Advisor

dld.sl: Bad magic number for shared

on hp-ux 11.0, whenever i call libexport.dl client from an application, rather it loads it, gives the followin alarm
Alarm message: Cannot initialize API CLIENT

and gives the same following warning on console

/usr/lib/dld.sl: Bad magic number for shared library: /home/manju/FiltersDepot/smexport/Source/OBJPIC/libexport.dl
/usr/lib/dld.sl: Exec format error

2 REPLIES 2
Santosh Nair_1
Honored Contributor

Re: dld.sl: Bad magic number for shared

What do you get if you do a file on the shared library, i.e.:

file /home/manju/FiltersDepot/smexport/Source/OBJPIC/libexport.dl

you should get something like :

PA-RISC1.1 shared library -not stripped

otherwise either there is something wrong with the library or it was build for a different platform, e.g. Sun Sparc or Linux.

-Santosh
Life is what's happening while you're busy making other plans
linuxfan
Honored Contributor

Re: dld.sl: Bad magic number for shared

Hi Sunil,

Not sure if this will help you or not,

From the HP Doc KBRC00000398
"bad magic number" and "exec" errors from dld.sl

/Begin/
Possible causes and the fixes are:


If libc is older than dld.sl or vice versa, then the two libraries will have difficulties understanding each other. Update both by installing the latest libc and dld.sl patches.

If the error was encountered while attempting to run a COBOL program, then it is possible that the executable was created on a PA1.1 machine using a shared library that was created on a PA2.0 machine. The linker did not give the typical warning that a PA2.0 object was detected. Instead, the only error returned occurred at runtime, when dld.sl attempted to bind the shared libraries. The only solutions are to:

compile and run the program on the same machine.
install the latest dld.sl and libc patches on both machines and recompile.

If /lib is not linked to /usr/lib, then the shared libraries will not have a reference point.
ln -s /usr/lib /lib

/End/

-HTH
Ramesh
They think they know but don't. At least I know I don't know - Socrates