re: 2.0 (pre-31#9): "N_TXTOFF < BLOCK_SIZE. Please convert binary."

Bradley Ward Allen (ulmo@Q.Net)
Thu, 18 Sep 1997 00:46:54 -0400


-----BEGIN PGP SIGNED MESSAGE-----

My recent error reporting helps. Here's what I found:

Sep 17 23:42:07 Q facility=kern(0) priority=notice(5) kernel: N_TXTOFF < BLOCK_SIZE. Please convert binary. inode 201816

Right about now I realize I should have reported device # too. Below
is updated patch. Not to worry ... case of confusion due to the inode
# is rare. My only other same file with that inode is an innocent
USENET message in the spool -- well, innocent of this crime, anyway ...

sh-2.01# IFS=:
sh-2.01# find $PATH -inum 201816 -print
/sbin/eql_enslave
sh-2.01#

(Please note that with the below patch, I could first find the device
in /dev, then see where it's mounted, then do "find /that/device -mount \
- -inum # -print", instead, if you were needing ideas; the $PATH thing
may still work and should still be your first stop since it is a lot
less files and is quicker.)

Alright, what the heck is /sbin/eql_enslave, and how does it
relate to my recent glibc upgrade??

sh-2.01# ldd /sbin/eql_enslave
not a dynamic executable
sh-2.01# file !$
file /sbin/eql_enslave
/sbin/eql_enslave: Linux/i386 demand-paged executable (ZMAGIC) not stripped
sh-2.01#

Alright, alright, so I don't even know what ZMAGIC is. Sounds
ancient. I wonder where I got eql_enslave from? drivers/net/README.eql
(is FreeBSD organized like this for experimental release support?):
ftp://slaughter.ncm.com/pub/Linux/LOAD_BALANCING/eql-1.1.tar.gz
What a hostname. And it's inaccessible. That hostname, and the
"enslave" programming hierarchical naming, brings back my memory
of my somewhat-X who was very offended by the "enslave" naming; I
remember that was the day we broke up, and can't help but wonder if
that had anything to do with it ... NCM is in VA, not exactly one of
the coasts ... anyway, I don't have a current use for eql, but just
for completeness, here I go:

archie finds eql-1.2.tar.gz wonderfully (I gave it "eql-"), and
inside is the same damned file (according to diff)!

Well, compiling eql_enslave under 2.0.30.9 (er, pre-2.0.31#9) under
glibc is one hell of a pain, but I did it, and I think it's ok
(sorry, I can't test right now).

Here's a better patch that includes the device number; duhh; inode
alone doesn't tell which device, and who said that "dd if=/dev/sda
of=/dev/sdb; mount /dev/sdb1 /usr; cd /usr/src/glibc; make install;
..." wasn't just done when this error was found :) (ok, that was
extreme, but it does demonstrate my point). This compiles, and the
last one (with only inodes) worked as expected, so it should be ok
(applied on Linux-pre-2.0.31#9).

===========
- --- linux-2.0/fs/binfmt_aout.c.~1~ Sat Aug 17 14:19:28 1996
+++ linux-2.0/fs/binfmt_aout.c Wed Sep 17 23:53:26 1997
@@ -277,13 +277,13 @@

#ifdef __i386__
if (N_MAGIC(ex) == ZMAGIC && fd_offset != BLOCK_SIZE) {
- - printk(KERN_NOTICE "N_TXTOFF != BLOCK_SIZE. See a.out.h.\n");
+ printk(KERN_NOTICE "N_TXTOFF != BLOCK_SIZE. See a.out.h. dev=%lu inode=%lu\n", (unsigned long) bprm->inode->i_dev, bprm->inode->i_ino);
return -ENOEXEC;
}

if (N_MAGIC(ex) == ZMAGIC && ex.a_text &&
(fd_offset < bprm->inode->i_sb->s_blocksize)) {
- - printk(KERN_NOTICE "N_TXTOFF < BLOCK_SIZE. Please convert binary.\n");
+ printk(KERN_NOTICE "N_TXTOFF < BLOCK_SIZE. Please convert binary. dev=%lu inode=%lu\n", (unsigned long) bprm->inode->i_dev, bprm->inode->i_ino);
return -ENOEXEC;
}
#endif
@@ -329,7 +329,7 @@
#endif
} else {
if (ex.a_text & 0xfff || ex.a_data & 0xfff)
- - printk(KERN_NOTICE "executable not page aligned\n");
+ printk(KERN_NOTICE "executable not page aligned; dev=%lu inode=%lu\n", (unsigned long) bprm->inode->i_dev, bprm->inode->i_ino);

fd = open_inode(bprm->inode, O_RDONLY);

@@ -443,7 +443,7 @@
}
if (N_MAGIC(ex) == ZMAGIC && N_TXTOFF(ex) &&
(N_TXTOFF(ex) < inode->i_sb->s_blocksize)) {
- - printk("N_TXTOFF < BLOCK_SIZE. Please convert library\n");
+ printk("N_TXTOFF < BLOCK_SIZE. Please convert library; dev=%lu inode=%lu\n", (unsigned long) inode->i_dev, inode->i_ino);
return -ENOEXEC;
}

=========== end patch

And BTW, what the hell is ZMAGIC, and what was one doing on my system?

I'm beginning to think all of my problems with "eql_enslave"
ulpitimizes Linux's disadvantages to FreeBSD.

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface

iQEVAwUBNCCx9pxWhFYc6x9VAQGtWwf/WIO3h2AKWGcIii2PUbDAV1O8+M4hNXyn
XYScI6f2S2gXK7S3wl63cmrmvfeu+lcAMLIJnDFWLv/5mWgx4Ed5nnJ3BfBRv3BN
OjTPC9QgNAn3tIDMVDqUr0YOtK3pj3h6whPXeNWD8cfUXJZzWG3oPVhjLQgjSup/
VtQGdSo2dO7Yfv9Nj6N5zziPePaznqfQnkQgJPbgxEVwraQwBhrq2aM671s/QImj
lEEKkRhWT0LeMbyoDqSljh8/eujvt/F6BnJ0JzqHfjiTDRhVvwLgIkQXa7G+Nb55
SEKnYr7pxKz1u+xTcLkbkMLCJhom3iH6jMYna1GVmNGbGY6hi7ZgQA==
=4fzy
-----END PGP SIGNATURE-----