lkml.org 
[lkml]   [2022]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86: Remove a.out support
On Sat, 2 Apr 2022, Kees Cook wrote:

> > Chiming in late as I'm scanning outstanding mailing list traffic: if this
> >is as you say all statically linked stuff, then converting from a.out to
> >ELF might be as easy as:
> >
> >$ objcopy -I a.out-i386-linux -O elf32-i386 a.out-binary elf-binary
>
> Based on my research (and the wrapper I ended up writing), I don't think
> this is sufficient because entry point handling is different between ELF
> and a.out (specifically the stack layout and initial sp register value).

Fair enough. I guess the exact value of %esp doesn't matter that much
(why would it?), but the arguments and environment may well be structured
differently (and indeed based on a glance over binfmt_aout.c there's extra
indirection involved compared to the ELF i386 psABI).

Maciej

\
 
 \ /
  Last update: 2022-04-04 13:04    [W:0.044 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site