search for: e_ident

Displaying 20 results from an estimated 62 matches for "e_ident".

2013 Dec 01
0
[PATCH v2 4/4] efi: PE file size differ from in-memory size
...quot;); if (!f_out) { perror("fopen"); @@ -198,15 +192,14 @@ int main(int argc, char **argv) /* * Parse the ELF header and find the entry point. */ - fread((void *)&e32_hdr, sizeof(e32_hdr), 1, f_in); + fread((void *)&e32_hdr, sizeof(e32_hdr), 1, f_in); if (e32_hdr.e_ident[EI_CLASS] == ELFCLASS32) { id = e32_hdr.e_ident; class = ELFCLASS32; entry = e32_hdr.e_entry; - shoff = e32_hdr.e_shoff; - shnum = e32_hdr.e_shnum; - shstrndx = e32_hdr.e_shstrndx; - shentsize = e32_hdr.e_shentsize; + phoff = e32_hdr.e_phoff; + phnum = e32_hdr.e_phnum; + phentsize =...
2013 Nov 27
0
[PATCH 4/4] efi: PE file size differ from in-memory size
...quot;); if (!f_out) { perror("fopen"); @@ -194,15 +188,14 @@ int main(int argc, char **argv) /* * Parse the ELF header and find the entry point. */ - fread((void *)&e32_hdr, sizeof(e32_hdr), 1, f_in); + fread((void *)&e32_hdr, sizeof(e32_hdr), 1, f_in); if (e32_hdr.e_ident[EI_CLASS] == ELFCLASS32) { id = e32_hdr.e_ident; class = ELFCLASS32; entry = e32_hdr.e_entry; - shoff = e32_hdr.e_shoff; - shnum = e32_hdr.e_shnum; - shstrndx = e32_hdr.e_shstrndx; - shentsize = e32_hdr.e_shentsize; + phoff = e32_hdr.e_phoff; + phnum = e32_hdr.e_phnum; + phentsize =...
2007 Mar 05
7
[PATCH 2/10] linux 2.6.18: COMPAT_VDSO
...{ +#if 1 + const unsigned long *reloc; + + for (reloc = reloc_start; reloc < reloc_end; ++reloc) { + unsigned long *ptr = (void *)((unsigned long)ehdr + *reloc); + + *ptr += new_base - old_base; + } +#else + unsigned i, ndynsym = 0, szdynsym = 0; + unsigned long dynsym = 0; + + BUG_ON(ehdr->e_ident[EI_MAG0] != ELFMAG0); + BUG_ON(ehdr->e_ident[EI_MAG1] != ELFMAG1); + BUG_ON(ehdr->e_ident[EI_MAG2] != ELFMAG2); + BUG_ON(ehdr->e_ident[EI_MAG3] != ELFMAG3); + BUG_ON(ehdr->e_ident[EI_CLASS] != ELFCLASS32); + BUG_ON(ehdr->e_ident[EI_DATA] != ELFDATA2LSB); + BUG_ON(ehdr->e_ehsize &l...
2007 Mar 05
7
[PATCH 2/10] linux 2.6.18: COMPAT_VDSO
...{ +#if 1 + const unsigned long *reloc; + + for (reloc = reloc_start; reloc < reloc_end; ++reloc) { + unsigned long *ptr = (void *)((unsigned long)ehdr + *reloc); + + *ptr += new_base - old_base; + } +#else + unsigned i, ndynsym = 0, szdynsym = 0; + unsigned long dynsym = 0; + + BUG_ON(ehdr->e_ident[EI_MAG0] != ELFMAG0); + BUG_ON(ehdr->e_ident[EI_MAG1] != ELFMAG1); + BUG_ON(ehdr->e_ident[EI_MAG2] != ELFMAG2); + BUG_ON(ehdr->e_ident[EI_MAG3] != ELFMAG3); + BUG_ON(ehdr->e_ident[EI_CLASS] != ELFCLASS32); + BUG_ON(ehdr->e_ident[EI_DATA] != ELFDATA2LSB); + BUG_ON(ehdr->e_ehsize &l...
2007 Mar 05
7
[PATCH 2/10] linux 2.6.18: COMPAT_VDSO
...{ +#if 1 + const unsigned long *reloc; + + for (reloc = reloc_start; reloc < reloc_end; ++reloc) { + unsigned long *ptr = (void *)((unsigned long)ehdr + *reloc); + + *ptr += new_base - old_base; + } +#else + unsigned i, ndynsym = 0, szdynsym = 0; + unsigned long dynsym = 0; + + BUG_ON(ehdr->e_ident[EI_MAG0] != ELFMAG0); + BUG_ON(ehdr->e_ident[EI_MAG1] != ELFMAG1); + BUG_ON(ehdr->e_ident[EI_MAG2] != ELFMAG2); + BUG_ON(ehdr->e_ident[EI_MAG3] != ELFMAG3); + BUG_ON(ehdr->e_ident[EI_CLASS] != ELFCLASS32); + BUG_ON(ehdr->e_ident[EI_DATA] != ELFDATA2LSB); + BUG_ON(ehdr->e_ehsize &l...
2007 Mar 22
0
[916] branches/wxruby2/wxwidgets_282: More Wx::AUI classes, event hooks and sample
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!-- #msg dl { border: 1px #006 solid; background: #369; padding:
2008 Feb 13
4
[PATCHv3 1/3] x86: use ELF format in compressed images.
...void error(char *x) asm("hlt"); } +static void parse_elf(void *output) +{ +#ifdef CONFIG_X86_64 + Elf64_Ehdr ehdr; + Elf64_Phdr *phdrs, *phdr; +#else + Elf32_Ehdr ehdr; + Elf32_Phdr *phdrs, *phdr; +#endif + void *dest; + int i; + + memcpy(&ehdr, output, sizeof(ehdr)); + if(ehdr.e_ident[EI_MAG0] != ELFMAG0 || + ehdr.e_ident[EI_MAG1] != ELFMAG1 || + ehdr.e_ident[EI_MAG2] != ELFMAG2 || + ehdr.e_ident[EI_MAG3] != ELFMAG3) + { + error("Kernel is not a valid ELF file"); + return; + } + + putstr("Parsing ELF... "); + + phdrs = malloc(sizeof(*phdrs) * ehdr....
2008 Feb 13
4
[PATCHv3 1/3] x86: use ELF format in compressed images.
...void error(char *x) asm("hlt"); } +static void parse_elf(void *output) +{ +#ifdef CONFIG_X86_64 + Elf64_Ehdr ehdr; + Elf64_Phdr *phdrs, *phdr; +#else + Elf32_Ehdr ehdr; + Elf32_Phdr *phdrs, *phdr; +#endif + void *dest; + int i; + + memcpy(&ehdr, output, sizeof(ehdr)); + if(ehdr.e_ident[EI_MAG0] != ELFMAG0 || + ehdr.e_ident[EI_MAG1] != ELFMAG1 || + ehdr.e_ident[EI_MAG2] != ELFMAG2 || + ehdr.e_ident[EI_MAG3] != ELFMAG3) + { + error("Kernel is not a valid ELF file"); + return; + } + + putstr("Parsing ELF... "); + + phdrs = malloc(sizeof(*phdrs) * ehdr....
2008 Jan 31
0
[PATCH] x86: use ELF format in compressed images.
...0,49 @@ static void error(char *x) asm("hlt"); } +static void parse_elf(void *output) +{ +#ifdef CONFIG_X86_64 + Elf64_Ehdr ehdr; + Elf64_Phdr *phdrs, *phdr; +#else + Elf32_Ehdr ehdr; + Elf32_Phdr *phdrs, *phdr; +#endif + int i; + + memcpy(&ehdr, output, sizeof(ehdr)); + if(ehdr.e_ident[EI_MAG0] != ELFMAG0 || + ehdr.e_ident[EI_MAG1] != ELFMAG1 || + ehdr.e_ident[EI_MAG2] != ELFMAG2 || + ehdr.e_ident[EI_MAG3] != ELFMAG3) + { + error("Kernel is not a valid ELF file"); + return; + } + + putstr("Parsing ELF... "); + + phdrs = malloc(sizeof(*phdrs) * ehdr....
2008 Jan 31
0
[PATCH] x86: use ELF format in compressed images.
...0,49 @@ static void error(char *x) asm("hlt"); } +static void parse_elf(void *output) +{ +#ifdef CONFIG_X86_64 + Elf64_Ehdr ehdr; + Elf64_Phdr *phdrs, *phdr; +#else + Elf32_Ehdr ehdr; + Elf32_Phdr *phdrs, *phdr; +#endif + int i; + + memcpy(&ehdr, output, sizeof(ehdr)); + if(ehdr.e_ident[EI_MAG0] != ELFMAG0 || + ehdr.e_ident[EI_MAG1] != ELFMAG1 || + ehdr.e_ident[EI_MAG2] != ELFMAG2 || + ehdr.e_ident[EI_MAG3] != ELFMAG3) + { + error("Kernel is not a valid ELF file"); + return; + } + + putstr("Parsing ELF... "); + + phdrs = malloc(sizeof(*phdrs) * ehdr....
2008 Feb 06
0
[PATCHv2 1/3] x86: use ELF format in compressed images.
...void error(char *x) asm("hlt"); } +static void parse_elf(void *output) +{ +#ifdef CONFIG_X86_64 + Elf64_Ehdr ehdr; + Elf64_Phdr *phdrs, *phdr; +#else + Elf32_Ehdr ehdr; + Elf32_Phdr *phdrs, *phdr; +#endif + void *dest; + int i; + + memcpy(&ehdr, output, sizeof(ehdr)); + if(ehdr.e_ident[EI_MAG0] != ELFMAG0 || + ehdr.e_ident[EI_MAG1] != ELFMAG1 || + ehdr.e_ident[EI_MAG2] != ELFMAG2 || + ehdr.e_ident[EI_MAG3] != ELFMAG3) + { + error("Kernel is not a valid ELF file"); + return; + } + + putstr("Parsing ELF... "); + + phdrs = malloc(sizeof(*phdrs) * ehdr....
2008 Feb 06
0
[PATCHv2 1/3] x86: use ELF format in compressed images.
...void error(char *x) asm("hlt"); } +static void parse_elf(void *output) +{ +#ifdef CONFIG_X86_64 + Elf64_Ehdr ehdr; + Elf64_Phdr *phdrs, *phdr; +#else + Elf32_Ehdr ehdr; + Elf32_Phdr *phdrs, *phdr; +#endif + void *dest; + int i; + + memcpy(&ehdr, output, sizeof(ehdr)); + if(ehdr.e_ident[EI_MAG0] != ELFMAG0 || + ehdr.e_ident[EI_MAG1] != ELFMAG1 || + ehdr.e_ident[EI_MAG2] != ELFMAG2 || + ehdr.e_ident[EI_MAG3] != ELFMAG3) + { + error("Kernel is not a valid ELF file"); + return; + } + + putstr("Parsing ELF... "); + + phdrs = malloc(sizeof(*phdrs) * ehdr....
2013 Nov 27
20
[PATCH 0/4] efi: PE header generation fix
The PE headers of the generated efi file were quite buggy. And since OVMF perform a few consistency checks, syslinux was unable to run on it. I don't pretend to have a thorough understanding of the PE+ headers, some bugs may remain. :) Celelibi (4): efi: Fix PE header field rva_and_sizes_nr efi: Location, size and alignment of .text section efi: Useless relocations in PE file efi: PE
2009 Jan 14
5
[PATCH] Support cross-bitness guest when core-dumping
This patch allows core-dumping to work on a cross-bit host/guest configuration, whereas previously that was not supported. It supports both PV and FV guests. The core file format generated by the host, needs to match that of the guest, so an alignment issue is addressed, along with the p2m frame list handling being done according to the guest size. Signed-off-by: Bruce Rogers
2010 Feb 01
1
[PATCH 03/23] vfs: rich ACL in-memory representation and manipulation
On Sun, 31 Jan 2010 23:28:52 -0800, Brad Boyer <flar at allandria.com> wrote: > > I have one suggestion about this part of the code. > > On Mon, Feb 01, 2010 at 11:04:45AM +0530, Aneesh Kumar K.V wrote: > > <snip> > > > +/* > > + * ACL entries that have ACE4_SPECIAL_WHO set in ace->e_flags use the > > + * pointer values of these constants
2010 Mar 20
2
[PATCH 4/4] btrfs-convert: split into convert/.
No material changes are made. --- Makefile | 10 +- convert.c => convert/convert.c | 803 +--------------------------------------- convert/convert.h | 76 ++++ convert/ext2.c | 791 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 873 insertions(+), 807 deletions(-) rename convert.c => convert/convert.c (74%) create mode
2007 May 31
1
[patch rfc wip] first cut of ELF bzImage
...linux/elf.h> +#include <linux/elf_boot.h> +#include <linux/elfnote.h> #include <asm/segment.h> #include <linux/utsrelease.h> #include <asm/boot.h> @@ -48,9 +51,72 @@ SWAP_DEV = 0 /* SWAP_DEV is now writte .global bootsect_start bootsect_start: - +ehdr: + # e_ident is carefully crafted so if this is treated + # as an x86 bootsector you will execute through + # e_ident and then print the bugger off message. + # The 1 stores to bx+di is unfortunate it is + # unlikely to affect the ability to print + # a message and you aren't supposed to be booting a + # bz...
2007 May 31
1
[patch rfc wip] first cut of ELF bzImage
...linux/elf.h> +#include <linux/elf_boot.h> +#include <linux/elfnote.h> #include <asm/segment.h> #include <linux/utsrelease.h> #include <asm/boot.h> @@ -48,9 +51,72 @@ SWAP_DEV = 0 /* SWAP_DEV is now writte .global bootsect_start bootsect_start: - +ehdr: + # e_ident is carefully crafted so if this is treated + # as an x86 bootsector you will execute through + # e_ident and then print the bugger off message. + # The 1 stores to bx+di is unfortunate it is + # unlikely to affect the ability to print + # a message and you aren't supposed to be booting a + # bz...
2008 Oct 20
0
PATCH[001/001]: mboot.c: prefer ELF header over multiboot header
...if ((load_size > sizeof(Elf32_Ehdr) && + BOOTABLE_I386_ELF((*((Elf32_Ehdr *) load_addr))))) { - /* Now look for an ELF32 header */ ehdr = (Elf32_Ehdr *)load_addr; - if (*(unsigned long *)ehdr != 0x464c457f - || ehdr->e_ident[EI_DATA] != ELFDATA2LSB - || ehdr->e_ident[EI_CLASS] != ELFCLASS32 - || ehdr->e_machine != EM_386) - { - printf("Fatal: kernel has neither ELF32/x86 nor multiboot load" - " headers.\n"); -...
2007 Jan 18
13
[PATCH 0/5] dump-core take 2:
The following dump-core patches changes its format into ELF, adds PFN-GMFN table, HVM support, and adds experimental IA64 support. - ELF format Program header and note section are adopted. - HVM domain support To know the memory area to dump, XENMEM_set_memory_map is added. XENMEM_memory_map hypercall is for current domain, so new one is created. and hvm domain builder tell xen its