Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Apr 1998 03:08:44 -0700
From:      John Polstra <jdp@polstra.com>
To:        shocking@prth.pgs.com
Cc:        hackers@FreeBSD.ORG
Subject:   Re: Converting ELF shared libs into a.out shared libs
Message-ID:  <199804151008.DAA28074@austin.polstra.com>
In-Reply-To: <199804150924.RAA01162@ariadne.tensor.pgs.com>
References:  <199804150924.RAA01162@ariadne.tensor.pgs.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <199804150924.RAA01162@ariadne.tensor.pgs.com>,
Stephen Hocking-Senior Programmer PGS Tensor Perth  <shocking@prth.pgs.com> wrote:

> What's involved, other than the different formats of jump tables and adding 
> prepended underscores?
> 
> 
> Stephen, who is determined to get that Glide library usable in native fbsd 
> apps.

It's a Linux library, I assume?  If it is, don't waste your time.
Even if you convert it to a.out, I can almost guarantee that it won't
work.

In general, you can't take a shared library built for one OS and
link it into another OS's application, and expect it to work.  This
has nothing to do with the object file format.  A library built on a
Linux system used the Linux header files, and therefore assumes that
such things as stdio structs and stat structs and so forth have the
Linux layout.  But ours don't.  They have the FreeBSD layout.  So
communication between the Linux shared library and our C library is
not going to work.

Back to your original question: I've thought a lot about converters
between a.out and ELF, because as you may know, FreeBSD is switching
to ELF Real Soon Now.  I believe that an a.out->ELF converter is
feasible, and I'm planning to write one.  When I was working through
it, I remember I decided that an ELF->a.out converter would be less
feasible.  But I can't remember the reason right now.  Sorry, I'm not
usually awake at this hour. :-)

John
--
   John Polstra                                       jdp@polstra.com
   John D. Polstra & Co., Inc.                Seattle, Washington USA
   "Self-knowledge is always bad news."                 -- John Barth

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199804151008.DAA28074>