Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion compiling lisp files into executables..

From: Eric Marsden <emars...@mail.dotcom.fr>
Subject: Re: compiling lisp files into executables..
Date: 1999/09/07
Message-ID: <wzi906iet02.fsf@mail.dotcom.fr>#1/1
X-Deja-AN: 522095554
Content-Transfer-Encoding: 8bit
References: <Pine.GSO.4.10.9908261837350.29071-100000@fosters.umd.edu> <4ng10xkwdz.fsf@rtp.ericsson.se> <7r142l$12o$1@counter.bik-gmbh.de> <wzig10rdmbt.fsf@mail.dotcom.fr> <7r2sqq$n2b$1@news.u-bordeaux.fr>
Content-Type: text/plain; charset=iso-8859-1
X-Complaints-To: abuse@laas.fr
X-Eric-Conspiracy: there is no conspiracy
X-Trace: kane.laas.fr 936711819 5809 140.93.21.56 (7 Sep 1999 13:43:39 GMT)
Organization: LAAS-CNRS  http://www.laas.fr/
X-URL: http://www.chez.com/emarsden/
X-Attribution: ecm
Mime-Version: 1.0
NNTP-Posting-Date: 7 Sep 1999 13:43:39 GMT
Newsgroups: comp.lang.lisp

>>>>> "bh" == Bruno Haible <hai...@clisp.cons.org> writes:

  [.interp section in ELF object files]
  
  bh> Yes, all ELF based Unices (Solaris, Linux, ...) implement it.
  bh> This feature is typically used for executing programs that were
  bh> compiled for other OSes, for example the iBCS package which
  bh> permits to run SVR4 binaries on Linux. Nowadays it is more used
  bh> to run Linux binaries on SVR4...

ok, thanks. For the curious, I investigated a little further. On
GNU/Linux with the GNU binutils:

    ~$ objdump -j .interp --full-contents `which ls` 
    /bin/ls:     file format elf32-i386
     
    Contents of section .interp:
     80480d4 2f6c6962 2f6c642d 6c696e75 782e736f  /lib/ld-linux.so
     80480e4 2e3200                               .2.

On Solaris:

    ~$ /usr/ccs/bin/dump -s -n .interp /bin/ls 
    /bin/ls:     
    .interp:
            2f 75 73 72 2f 6c 69 62 2f 6c 64 2e 73 6f 2e 31 00


  bh> But putting your own value there means that you will have to
  bh> take care of not removing the dynamic loading features provided
  bh> by the "normal" interpreter (/lib/ld-linux.so.2 on Linux).

ok, you'd have to chain in ld.so. But this seems to be an alternative
to the binfmt_misc module on linux[1], which allows you to associate
certain object types with an interpreter.

[1] <URL:http://www.kernelnotes.org/doc22/binfmt_misc.txt>

-- 
Eric Marsden
It's elephants all the way down