Re: [PATCH] x86: Remove a.out support

From: Kees Cook
Date: Tue Mar 15 2022 - 15:51:58 EST


On Sat, Mar 12, 2022 at 06:06:26PM +0000, James Jones wrote:
> [...]
> > docs, including copies of the old mac and aln a.out binaries, is
> > available here:
> >
> > https://github.com/cubanismo/jaguar-sdk

Do these end up requiring libc4, etc? I see "uselib" syscalls in the
disassembly...

$ for i in $(objdump -b binary -D -m i386 aln mac | grep -B4 'int.*$0x80' \
| grep -E 'int|eax' | grep mov | awk '{print $8}' | cut -d, -f1 \
| cut -c2- | sort -u); do printf "%d\n" $i; done | sort -n
1 exit
3 read
4 write
5 open
6 close
10 unlink
13 time
19 lseek
20 getpid
37 kill
45 brk
54 ioctl
55 fcntl
86 uselib
89 readdir
91 munmap
106 stat
107 lstat
108 fstat
126 sigprocmask

It seems like it should be possible to create an ELF wrapper for simple
a.out binaries...

--
Kees Cook