[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH RFC 2/7] xen/x86: Manually build PE header



>>> On 14.05.18 at 18:52, <daniel.kiper@xxxxxxxxxx> wrote:
> On Mon, May 14, 2018 at 04:40:39AM -0600, Jan Beulich wrote:
>> >>> On 08.05.18 at 14:47, <daniel.kiper@xxxxxxxxxx> wrote:
>> > On Fri, May 04, 2018 at 09:38:03AM -0600, Jan Beulich wrote:
>> >> >>> On 08.07.17 at 23:53, <daniel.kiper@xxxxxxxxxx> wrote:
>> >> > +        /*
>> >> > +         * DOS message.
>> >> > +         *
>> >> > +         * It is copied from binutils package, version 2.28,
>> >> > +         * include/coff/pe.h:struct external_PEI_filehdr and
>> >> > +         * bfd/peXXigen.c:_bfd_XXi_only_swap_filehdr_out().
>> >> > +         */
>> >> > +        .long   0x0eba1f0e
>> >> > +        .long   0xcd09b400
>> >> > +        .long   0x4c01b821
>> >> > +        .long   0x685421cd
>> >> > +        .long   0x70207369
>> >> > +        .long   0x72676f72
>> >> > +        .long   0x63206d61
>> >> > +        .long   0x6f6e6e61
>> >> > +        .long   0x65622074
>> >> > +        .long   0x6e757220
>> >> > +        .long   0x206e6920
>> >> > +        .long   0x20534f44
>> >> > +        .long   0x65646f6d
>> >> > +        .long   0x0a0d0d2e
>> >> > +        .long   0x24
>> >> > +        .long   0
>> >>
>> >> Other than what the comment says, this isn't just a message (or else you
>> >> could have used .asciz for the whole thing). I'm not convinced we need
>> >> any of this.
>> >
>> > Potentially we can drop this. However, ld from binutils put this into
>> > EFI binary. And IIRC this is exactly what is embedded by other linkers
>> > into PE/COFF compatible files, e.g. *.efi, *.exe, *.dll, etc. So,
>> > I would leave this just for the sake of compatibility.
>>
>> Having this in .exe files is indeed helpful (or at least was back when DOS 
>> still
>> played some sort of a role). In .dll it is already highly questionable, and
>> hence even more so in .efi. Let's not encode and carry cruft that's not
>> needed for anything.
> 
> OK, but I think that we should leave at least one or two instructions here, 
> e.g.
> hlt and jmp back to it or something like that. Or int 0x21 with 0x4c00 in %ax.
> Latter seems better for me.

I certainly don't mind you doing something minimalistic like what you propose.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.