From owner-freebsd-emulation Thu Jun 27 16:21: 1 2002 Delivered-To: freebsd-emulation@freebsd.org Received: from rwcrmhc52.attbi.com (rwcrmhc52.attbi.com [216.148.227.88]) by hub.freebsd.org (Postfix) with ESMTP id B80D037B41C for ; Thu, 27 Jun 2002 16:20:15 -0700 (PDT) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc52.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020627232015.DBCQ8262.rwcrmhc52.attbi.com@InterJet.elischer.org>; Thu, 27 Jun 2002 23:20:15 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id QAA71200; Thu, 27 Jun 2002 16:04:52 -0700 (PDT) Date: Thu, 27 Jun 2002 16:04:51 -0700 (PDT) From: Julian Elischer To: Jjim Bodkins Cc: freebsd-emulation@freebsd.org Subject: Re: Linking with Solaris .o's In-Reply-To: <002101c21e2d$7dd703c0$3e7cb5d1@notebook8> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Thu, 27 Jun 2002, Jjim Bodkins wrote: > Hi, > > I did an experiment between Solaris (Intel) 8 and FreeBSD 4.4. I created > a .o on Solaris, moved it to FreeBSD and linked it with a native FreeBSD .o > and it produced an executable that ran. (I did this as a test. I have a > number of libraries in .a form that I would like to use on FreeBSD). > > When I attempt to link against the Solaris .a's (they are libraries from > a non Sun source. Not standard libs) I get this ... unless you have the appropriate .h files of course this is dangerous.. ther eare teh following things to consider.. 1/ does teh flag for 'readonly' in solaris map to the flag 'truncate on open' in a freebsd system call? (an example of what might happen) also what about structure padding considerations? how about the NUMBER of arguments.. symbols don't give this info.. FreeBSD lseek takes a 64 bit offset.. does solaris's? etc etc. same problems with linux.. it may link but..... why not compile on solaris and just use the solaris emulation? > > > /usr/libexec/elf/ld: section .stab.exclstr [00000000 -> 0000002e] overlaps > secti > on .stab.excl [00000000 -> 0000005f] > /usr/libexec/elf/ld: section .stab.index [00000000 -> 0000011f] overlaps > section > .stab.excl [00000000 -> 0000005f] > /usr/libexec/elf/ld: section .stab.indexstr [00000000 -> 000000fd] overlaps > sect > ion .stab.excl [00000000 -> 0000005f] > /usr/libexec/elf/ld: ck: Not enough room for program headers (allocated 6, > need > 7) > /usr/libexec/elf/ld: final link failed: Bad value > *** Error code 1 > > I'm not sure what this means exactly. My test was in C. For all I know, > the code in the libs were generated in assembler. Dont know. Any ideas? > > Another option that I have is to use the same libs from Linux. However, > that would require an additional purchase and I'm not sure that Linux libs > can be used in a linking process with native FreeBSD code. Can they or are > they only usefull in support of Linux binaries? > > Any help would be appreciated. > > Jim > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-emulation" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message