[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: binary problems



On Thu, 1 May 1997, Jesse Goldman wrote:

> I'm having a strange problem with some machines here. Both are pentiums
> running debian which have the same versions of all software on them. The
> kernel version is 2.0.30. Within the last couple hours, something's
> happened to cause them to have trouble executing binaries. One was an
> executable I compiled, the other was doom (even more important). The
> message I get after executing is:
> 
> [executable]: Exec format error. Binary file not executable.
> 
> And yet running "file" on it gives:
> 
> [executable]: Linux/i386 demand-paged executable (ZMAGIC), stripped
> 
> which should be fine. (This same program works on another Linux machine I
> have)  I thought it might be a problem with binutils or libbfd but
> reinstalling them didn't help. For some reason, recompiling the first
> application seemed to fix the problem but with doom, I'm stuck (and with
> any other executable I download). Any ideas why this is happening?

You haven't recompiled your kernel, or moved your modules around, or
something? The problem appears to be that your files are a.out, rather
than ELF like most binaries, which is what ZMAGIC (and QMAGIC, I'm not
sure on the difference) means. It looks like your system may not be able
to find the code to run code in a.out format any more. I tried this on my
system (using one of the four a.out executables I have left! I'm afraid I
couldn't find a ZMAGIC at all ...), by renaning the module file and
trying to run it. As you can see, I got roughly the same error:
---
asm21@asm21:~$ file `which bible`
/usr/local/bin/bible: Linux/i386 demand-paged executable (QMAGIC), stripped
asm21@asm21:~$ sudo mv /lib/modules/2.0.29/fs/binfmt_aout.{o,tmp}
asm21@asm21:~$ bible
bash: /usr/local/bin/bible: cannot execute binary file
[Exit 126]
asm21@asm21:~$ sudo mv /lib/modules/2.0.29/fs/binfmt_aout.{tmp,o}
asm21@asm21:~$ bible
bible: BRS Release 4.00, $Date: 93/04/26 11:18:28 $
Hit '?' for help.

Genesis 1

  1 In the beginning God created the heaven and the earth.
bible(KJV) [Gen1:1]> q
asm21@asm21:~$
---

The fix is to recompile your kernel, and include support for a.out
binaries either as a module or in the kernel. If you just want it as a
module (which I'd recommend), you probably only need to make the modules.

I have no idea why it compiled as a.out for you, though ...

HTH,

&E

-- 
Andy Mortimer, andy.mortimer@poboxes.com
http://www.netforward.com/poboxes/?andy.mortimer
Finger asm21@asm21.emma.cam.ac.uk for PGP public key
--
Give me life, give me pain,
Give me myself again.


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: