Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!spool.mu.edu!uunet!bywater!arnor!arnor!marc From: marc@watson.ibm.com (Marc Auslander) Newsgroups: comp.unix.aix Subject: Re: Shared library problem Message-ID: Date: 11 Apr 91 21:38:31 GMT References: <6558@awdprime.UUCP> Sender: news@watson.ibm.com (NNTP News Poster) Organization: IBM T.J. Watson Research Center, Hawthorne, New York Lines: 30 In-Reply-To: andy@ausvm1.iinus1.ibm.com's message of 10 Apr 91 19:03:15 GMT Nntp-Posting-Host: marc In article <6558@awdprime.UUCP> andy@ausvm1.iinus1.ibm.com (Andy Martin) writes: ... >However when I use the -r flag to ignore the unresolved references for a later >pass I get the error below. > % ld -H512 -T512 -o $shobj $objs -bE:$exp -bM:SRE -r > % ar rv $shlib $shobj > % cc prog.c $shlib -lXll -lbsd -lnck > % setenv LIBPATH : > % a.out > Could not load program a.out > Could not load library $shlib[shobj] > Error was: Exec format error > % You cannot make an executable module or library using -r. -r is only for intermediate ld steps, with the output intended as input to another ld step. A shared object must be executable. The execloader is telling you it is not. By the way, -r always make the module non-executable, even if no undefined symbols where found. -- Marc Auslander