Re: 1.3.66 - ip_masq still broken :(

bs_s641@kingston.ac.uk
Sun, 18 Feb 1996 19:58:05 +0100


Dear Victor,

Thank you for sending your new version of dproc.c for lsof. I have compiled
it and now I get this:

saturn:/users/lsof# ./lsof
lsof: can't get kernel symbol table size: Function not implemented
lsof: WARNING: uncertain kernelloader format; assuming COFF.
lsof: no _task kernel definition

AFAIK _task should not be in ELF kernel but only in a.out one so I thought
I would change the default binary format expected by lsof so, I decided to
have a look at the actual source and noticed that in dproc.c it defaults
to COFF (well, I could look at the warning message instead
of source :) ) and slightly patched dproc.c so that it works fine now:

In function nlist() of file dproc.c do this:
/*
* Complain if we don't know the kernel binary's format, COFF or ELF, or if
- * we have conflicting evidence. In either case, set the format to COFF.
+ * we have conflicting evidence. In either case, set the format to ELF.
*/
if ((!Coff && !elf) || (Coff && elf)) {
if (!Fwarn) {
(void) fprintf(stderr, "%s: WARNING: uncertain kernel", Pn);
- (void) fprintf(stderr, "loader format; assuming COFF.\n");
+ (void) fprintf(stderr, "loader format; assuming ELF.\n");
}
- Coff = 1;
- elf = 0;
+ Coff = 0;
+ elf = 1;
}

Maybe my habit of modifying comments as well as the source will seem a bit
pathetic but at least it is consistent... Anyway, I am happy as long as it
works.

Thanks a lot for your patience and attention,

Tigran (bs_s641@ceres.king.ac.uk).