grub-devel
[Top][All Lists]
Advanced

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

RE: [PATCH] generic ELF loading


From: Hollis Blanchard
Subject: RE: [PATCH] generic ELF loading
Date: Tue, 24 Oct 2006 15:21:07 -0500

On Sat, 2006-10-14 at 11:03 +0800, Mao, Bibo wrote:
>    I do not know whether it is possible to add one element in
> structure grub_elf_file structure to identify ELF type
> (ELFCLASS32/ELFCLASS64) and ELF machine type, this element can be set
> at function grub_elf_open.

I'm not sure it saves much, since you'd still want a wrapper function,
and the info is already present in `ehdr' anyways. It comes down to
        int grub_elf_is_elf32 (grub_elf_t elf)
        {
          return elf->ehdr.ehdr32.e_ident[EI_CLASS] == ELFCLASS32;
        }
vs
        int grub_elf_is_elf32 (grub_elf_t elf)
        {
          return elf->class == ELFCLASS32;
        }

-Hollis





reply via email to

[Prev in Thread] Current Thread [Next in Thread]