Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Sep 1998 19:24:39 +0800
From:      Peter Wemm <peter@netplex.com.au>
To:        Mark Murray <mark@grondar.za>
Cc:        John Birrell <jb@cimlogic.com.au>, brian@worldcontrol.com, freebsd-current@FreeBSD.ORG
Subject:   Re: xanim and linuxELF.o 
Message-ID:  <199809271124.TAA12568@spinner.netplex.com.au>
In-Reply-To: Your message of "Sun, 27 Sep 1998 11:38:49 %2B0200." <199809270938.LAA20426@gratis.grondar.za> 

next in thread | previous in thread | raw e-mail | index | archive | help
Mark Murray wrote:
> John Birrell wrote:
> > Mark Murray wrote:
> > > > 
> > > > produces working code.  Are elf objects interchangable in this way amon
    g
> > > > all elf systems?  Is this supposed to work?
> > > 
> > > Only if there are no syscalls.
> > 
> > What about the code being compiled against header files that differ
> > from those in our libc?  Does stdio work?
> 
> Er... :-)
> 
> s/syscalls/syscalls and library calls/
> 
> It works if the supplied routine(s) is(are) self-contained.

It also works on simple syscalls or library calls that take simple
arguments..  eg: getpid(), getcwd(), etc.  Things like stat(), stdio, will
not.

It won't work for things that return structures.. Linux uses 
'pcc-struct-return', we do not.  ie:

struct foo
bar() {
	struct foo xx;
	xx.yy = 1;
	return xx;
}

.. will not work.  We use the older (better) gcc way.  gcc changed to use
the AT&T compiler (pcc) method by default sometime around 2.3 or 2.4 from
memory.  The old way is reentrant, supports recursion, etc.  The pcc 
method does not.  Mind you, this compiler feature is very rarely used.

> M

Cheers,
-Peter




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



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