From owner-freebsd-questions Tue May 28 17:13:43 2002 Delivered-To: freebsd-questions@freebsd.org Received: from tlb.blackwells.net (ProCertify10.dsl.concentric.net [206.111.132.170]) by hub.freebsd.org (Postfix) with ESMTP id ECAA637B400 for ; Tue, 28 May 2002 17:13:38 -0700 (PDT) Received: from tlb.blackwells.net (localhost.servtech.com [127.0.0.1]) by tlb.blackwells.net (8.11.6/8.11.1) with ESMTP id g4T0Dcd48186 for ; Tue, 28 May 2002 17:13:38 -0700 (PDT) (envelope-from tlb@tlb.blackwells.net) Message-Id: <200205290013.g4T0Dcd48186@tlb.blackwells.net> From: tlb@trevorblackwell.com To: freebsd-questions@FreeBSD.ORG Subject: Re: linking commercial linux library In-reply-to: Your message of "Tue, 28 May 2002 14:31:26 PDT." Date: Tue, 28 May 2002 17:13:37 -0700 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I got it to work by chainsawing out the version information: objcopy -R .gnu.version Linux/libisense.so Freebsd/libisense.so then it happily linked against the unversioned functions in libc. > I have a commercial library (without source) compiled for Linux that I > want to use in a FreeBSD application. It refers to symbols with a > version node of GLIBC_2.0: > > Linux/libisense.so: undefined reference to `strcpy@GLIBC_2.0' > > I could link my entire application against glibc and the Linux > libraries, but because I make subtle use of some regular BSD > libraries, I don't want to do this. It should be able to use the BSD > versions of everything it needs. > > I tried various linking with: > > --defsym 'strcpy@GLIBC_2.0=strcpy' > > to make it use the regular libc functions, but ld gives a syntax error > on the @. I've been able to make an assembler file that defines the > function, but I can't seem to refer to the original libc functions > from it. > > Any suggestions? I would consider using glibc versions of just the > offending functions if I could avoid it getting used anywhere else. -- Trevor Blackwell tlb@trevorblackwell.com (650) 776-7870 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message