diff options
author | Jacob Moody <moody@posixcafe.org> | 2023-05-09 20:02:13 +0000 |
---|---|---|
committer | Jacob Moody <moody@posixcafe.org> | 2023-05-09 20:02:13 +0000 |
commit | 91ae69be3306c807ae5bfa7d1b7ced8c239f9214 (patch) | |
tree | 4bd19ace41c10c83757c6d5850b200272c297618 /sys/src | |
parent | 98b8e7609c725beeb7520863b3d0e07d95396e05 (diff) |
libmach: remove obsolete fishy case in mips header parsing
This code seems to be for the specific case of when
mips 3000 binaries were being run on a mips 4000 kernel.
As far as I know, our only current mips magic refers to the
5000 (at least), and the 4000 specific magic formats are mostly a relic.
There is currently no bootable system in which this code
path is correct. In any case, hardcoding /proc/1 is not the solution.
Diffstat (limited to 'sys/src')
-rw-r--r-- | sys/src/libmach/executable.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/sys/src/libmach/executable.c b/sys/src/libmach/executable.c index 46b1a07d7..d9ef43988 100644 --- a/sys/src/libmach/executable.c +++ b/sys/src/libmach/executable.c @@ -248,27 +248,6 @@ ExecTable exectab[] = Mach *mach = &mi386; /* Global current machine table */ -static ExecTable* -couldbe4k(ExecTable *mp) -{ - Dir *d; - ExecTable *f; - - if((d=dirstat("/proc/1/regs")) == nil) - return mp; - if(d->length < 32*8){ /* R3000 */ - free(d); - return mp; - } - free(d); - for (f = exectab; f->magic; f++) - if(f->magic == M_MAGIC) { - f->name = "mips plan 9 executable on mips2 kernel"; - return f; - } - return mp; -} - int crackhdr(int fd, Fhdr *fp) { @@ -302,9 +281,6 @@ crackhdr(int fd, Fhdr *fp) if(mp->magic != (magic & ~DYN_MAGIC)) continue; - if(mp->magic == V_MAGIC) - mp = couldbe4k(mp); - if ((magic & DYN_MAGIC) && mp->dlmname != nil) fp->name = mp->dlmname; else |