Re: [RFC][PATCH 1/2] binfmt_elf: FatELF support in the binaryloader.
From: Ryan C. Gordon
Date: Fri Oct 23 2009 - 20:26:10 EST
> It would be nice to have something that would conceptually work for
> other architectures with other executable file formats. Granted ELF is
> most common, but its far from the only one.
It would be nice, but I'm not certain it's practical. I mean, if we embed
a Windows .exe in there, Windows is never going to be able to load it, I
presume.
That being said, I suppose there's no reason you _couldn't_ do that with
the existing FatELF format. Just add an OSABI for, say, Windows PE files
and embed one like anything else. Non-Windows platforms will ignore it
because it's the wrong OSABI. If something tried to process it as an ELF
file, it'll correctly believe it to be a corrupt file.
(Replace Windows with your favorite non-ELF platform if you like.)
This isn't really a goal of the project, but since you brought it up, it
IS actually feasible with the existing code and framework.
> Well, its really a bit diseased, with lots of gristly bits and a few
> unexpected tubes sticking out the side.
Eww.
--ryan.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/