[lkml]   [2022]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] x86: Remove a.out support

On April 2, 2022 3:14:43 PM PDT, "Maciej W. Rozycki" <> wrote:
>On Wed, 16 Mar 2022, James Jones wrote:
>> Probably getting a bit off topic, but I did spend a few hours searching
>> around for any existing tools to convert a binary from a.out->ELF, and
>> trying to come up with something myself by extracting the sections with
>> objdump and re-combining them into an ELF using a linker script placing
>> the sections at the same locations. I couldn't get it working in an
>> evening or two messing with it so I moved on, but I agree something like
>> this seems possible in theory.
> 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).


Kees Cook

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