From owner-freebsd-current Sun Sep 27 04:27:05 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA19532 for freebsd-current-outgoing; Sun, 27 Sep 1998 04:27:05 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from spinner.netplex.com.au (spinner.netplex.com.au [202.12.86.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA19457 for ; Sun, 27 Sep 1998 04:26:35 -0700 (PDT) (envelope-from peter@netplex.com.au) Received: from spinner.netplex.com.au (localhost [127.0.0.1]) by spinner.netplex.com.au (8.9.1/8.9.1/Spinner) with ESMTP id TAA12568; Sun, 27 Sep 1998 19:24:39 +0800 (WST) (envelope-from peter@spinner.netplex.com.au) Message-Id: <199809271124.TAA12568@spinner.netplex.com.au> X-Mailer: exmh version 2.0.2 2/24/98 To: Mark Murray cc: John Birrell , brian@worldcontrol.com, freebsd-current@FreeBSD.ORG Subject: Re: xanim and linuxELF.o In-reply-to: Your message of "Sun, 27 Sep 1998 11:38:49 +0200." <199809270938.LAA20426@gratis.grondar.za> Date: Sun, 27 Sep 1998 19:24:39 +0800 From: Peter Wemm Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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