From owner-freebsd-current Tue Jan 5 19:05:44 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA01124 for freebsd-current-outgoing; Tue, 5 Jan 1999 19:05:44 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from wall.polstra.com (rtrwan160.accessone.com [206.213.115.74]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA01114 for ; Tue, 5 Jan 1999 19:05:33 -0800 (PST) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.9.1/8.9.1) with ESMTP id TAA16436; Tue, 5 Jan 1999 19:04:26 -0800 (PST) (envelope-from jdp@polstra.com) From: John Polstra Received: (from jdp@localhost) by vashon.polstra.com (8.9.1/8.9.1) id TAA36807; Tue, 5 Jan 1999 19:04:23 -0800 (PST) (envelope-from jdp@polstra.com) Date: Tue, 5 Jan 1999 19:04:23 -0800 (PST) Message-Id: <199901060304.TAA36807@vashon.polstra.com> To: hgoldste@bbs.mpcs.com Subject: Re: ELF interpreter /usr/lib/libc.so.1 not found (on 3.0-CURRENT 12/20/98) Newsgroups: polstra.freebsd.hackers In-Reply-To: <13962.6777.503181.771874@penny.south.mpcs.com> Organization: Polstra & Co., Seattle, WA Cc: current@FreeBSD.ORG Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article <13962.6777.503181.771874@penny.south.mpcs.com>, Howard Goldstein wrote: > > My own program seems to be calling for a shared library I didn't link > it against, at runtime. I don't recall having this happen when > running everything through cc, but alas I don't have that option since > one of the modules had to be ported from masm to nasm, so here I am.... > > > slice:~/src/develop$ ./v2show > ELF interpreter /usr/lib/libc.so.1 not found > Abort trap Add "-dynamic-linker /usr/libexec/ld-elf.so.1" to your "ld" command. The "ELF interpreter" is the dynamic linker that the kernel is trying to load. Its pathname defaults (in the linker) to "/usr/lib/libc.so.1", which is the old SVR4 version. This must be overridden on the linker command line. "cc" automatically does that. You really should try to use "cc" for linking, because there's lots of non-obvious stuff that needs to go onto the command line for "ld". Take some simple program "hello.c", and do this: cc -v hello.c You'll see the generated linker command at the end. It's pretty complicated. I don't understand why your masm/nasm problem would affect linking. The linker only deals with object files, not with assembly language sources. John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Nobody ever went broke underestimating the taste of the American public." -- H. L. Mencken To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message