search for: ehdr

Displaying 20 results from an estimated 84 matches for "ehdr".

2007 Mar 05
7
[PATCH 2/10] linux 2.6.18: COMPAT_VDSO
...o_rel_int80_start[], vdso_rel_int80_end[]; +extern const unsigned long vdso_rel_sysenter_start[], vdso_rel_sysenter_end[]; #endif /* @@ -66,6 +68,142 @@ void enable_sep_cpu(void) #endif } +#if defined(CONFIG_XEN) && defined(CONFIG_COMPAT_VDSO) +static void __init relocate_vdso(Elf32_Ehdr *ehdr, unsigned long old_base, unsigned long new_base, + const unsigned long *reloc_start, const unsigned long *reloc_end) +{ +#if 1 + const unsigned long *reloc; + + for (reloc = reloc_start; reloc < reloc_end; ++reloc) { + unsigned long *ptr = (void *)((unsigne...
2007 Mar 05
7
[PATCH 2/10] linux 2.6.18: COMPAT_VDSO
...o_rel_int80_start[], vdso_rel_int80_end[]; +extern const unsigned long vdso_rel_sysenter_start[], vdso_rel_sysenter_end[]; #endif /* @@ -66,6 +68,142 @@ void enable_sep_cpu(void) #endif } +#if defined(CONFIG_XEN) && defined(CONFIG_COMPAT_VDSO) +static void __init relocate_vdso(Elf32_Ehdr *ehdr, unsigned long old_base, unsigned long new_base, + const unsigned long *reloc_start, const unsigned long *reloc_end) +{ +#if 1 + const unsigned long *reloc; + + for (reloc = reloc_start; reloc < reloc_end; ++reloc) { + unsigned long *ptr = (void *)((unsigne...
2007 Mar 05
7
[PATCH 2/10] linux 2.6.18: COMPAT_VDSO
...o_rel_int80_start[], vdso_rel_int80_end[]; +extern const unsigned long vdso_rel_sysenter_start[], vdso_rel_sysenter_end[]; #endif /* @@ -66,6 +68,142 @@ void enable_sep_cpu(void) #endif } +#if defined(CONFIG_XEN) && defined(CONFIG_COMPAT_VDSO) +static void __init relocate_vdso(Elf32_Ehdr *ehdr, unsigned long old_base, unsigned long new_base, + const unsigned long *reloc_start, const unsigned long *reloc_end) +{ +#if 1 + const unsigned long *reloc; + + for (reloc = reloc_start; reloc < reloc_end; ++reloc) { + unsigned long *ptr = (void *)((unsigne...
2008 Feb 13
4
[PATCHv3 1/3] x86: use ELF format in compressed images.
...#include <linux/screen_info.h> +#include <linux/elf.h> #include <asm/io.h> #include <asm/page.h> #include <asm/boot.h> @@ -365,6 +370,56 @@ 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 + 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_...
2008 Feb 13
4
[PATCHv3 1/3] x86: use ELF format in compressed images.
...#include <linux/screen_info.h> +#include <linux/elf.h> #include <asm/io.h> #include <asm/page.h> #include <asm/boot.h> @@ -365,6 +370,56 @@ 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 + 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_...
2008 Jan 31
0
[PATCH] x86: use ELF format in compressed images.
...#include <linux/screen_info.h> +#include <linux/elf.h> #include <asm/io.h> #include <asm/page.h> #include <asm/boot.h> @@ -365,6 +370,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]...
2008 Jan 31
0
[PATCH] x86: use ELF format in compressed images.
...#include <linux/screen_info.h> +#include <linux/elf.h> #include <asm/io.h> #include <asm/page.h> #include <asm/boot.h> @@ -365,6 +370,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]...
2008 Feb 06
0
[PATCHv2 1/3] x86: use ELF format in compressed images.
...#include <linux/screen_info.h> +#include <linux/elf.h> #include <asm/io.h> #include <asm/page.h> #include <asm/boot.h> @@ -365,6 +370,56 @@ 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 + 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_...
2008 Feb 06
0
[PATCHv2 1/3] x86: use ELF format in compressed images.
...#include <linux/screen_info.h> +#include <linux/elf.h> #include <asm/io.h> #include <asm/page.h> #include <asm/boot.h> @@ -365,6 +370,56 @@ 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 + 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_...
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
2007 Apr 18
1
[PATCH 0/2] Use a single loader for i386 and x86_64
...static u32 finish(unsigned long mem, uns return (unsigned long)pgdir; } +static unsigned long finish64(unsigned long mem, unsigned long *page_offset, + const char *initrd, unsigned long *ird_size) +{ + return 0; +} + /* Returns the entry point */ -static u32 map_elf(int elf_fd, const Elf32_Ehdr *ehdr, unsigned long mem, +static unsigned long map_elf32(int elf_fd, const Elf32_Ehdr *ehdr, unsigned long mem, unsigned long *pgdir_addr, const char *initrd, unsigned long *ird_size, unsigned long *page_offset) @@ -210,7 +227,7 @@ static u32 map_elf(int elf_fd, const Elf con...
2007 Apr 18
1
[PATCH 0/2] Use a single loader for i386 and x86_64
...static u32 finish(unsigned long mem, uns return (unsigned long)pgdir; } +static unsigned long finish64(unsigned long mem, unsigned long *page_offset, + const char *initrd, unsigned long *ird_size) +{ + return 0; +} + /* Returns the entry point */ -static u32 map_elf(int elf_fd, const Elf32_Ehdr *ehdr, unsigned long mem, +static unsigned long map_elf32(int elf_fd, const Elf32_Ehdr *ehdr, unsigned long mem, unsigned long *pgdir_addr, const char *initrd, unsigned long *ird_size, unsigned long *page_offset) @@ -210,7 +227,7 @@ static u32 map_elf(int elf_fd, const Elf con...
2008 Oct 20
0
PATCH[001/001]: mboot.c: prefer ELF header over multiboot header
...} else { - /* No BSS */ - add_section(run_addr, seg_addr, run_size); - } - - /* Done. */ - return mbh->entry_addr; - - } else { + /* Look for a bootable ELF32 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 -...
2005 Mar 06
1
testers sought for script to interpret ELF/klibc executables
...or 64 bit) # - the first private header with type PT_INTERP gives offset and # size of the interpreter filename in the executable # - extract that filename and strip trailing null byte. # use warnings; use strict; sub PATH_MAX () {4096;} sub SZ_ELF32HDR () {52;} sub SZ_ELF64HDR () {64;} # Elf32_Ehdr->e_ident[4]: are variables 32 or 64 bit sub ELFCLASS32 () {1;} sub ELFCLASS64 () {2;} # Elf32_Ehdr->e_type: whether it's an executable, core, object # file or something else entirely. sub ET_EXEC () {2;} sub ET_DYN () {3;} # # ELF Private header # sub SZ_ELF32PHDR {32;} sub SZ_ELF64PHDR...
2007 Apr 18
4
[patch 0/2] Updates to compat VDSOs
Hi Andi, Here's a couple of patches to fix up COMPAT_VDSO: The first is a straightforward implementation of Jan's original idea of relocating the VDSO to match its mapped location. Unlike Jan and Zach's version, I changed it to relocate based on the phdrs rather than the sections; the result is pleasantly compact. The second patch takes advantage of the fact that all the
2007 Apr 18
4
[patch 0/2] Updates to compat VDSOs
Hi Andi, Here's a couple of patches to fix up COMPAT_VDSO: The first is a straightforward implementation of Jan's original idea of relocating the VDSO to match its mapped location. Unlike Jan and Zach's version, I changed it to relocate based on the phdrs rather than the sections; the result is pleasantly compact. The second patch takes advantage of the fact that all the
2007 Apr 18
1
[PATCH] Unified lguest launcher
This is a new version of the unified lguest launcher that applies to the current tree. According to rusty's suggestion, I'm bothering less to be able to load 32 bit kernels on 64-bit machines: changing the launcher for such case would be the easy part! In the absence of further objections, I'll commit it. Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com> -- =
2007 Apr 18
1
[PATCH] Unified lguest launcher
This is a new version of the unified lguest launcher that applies to the current tree. According to rusty's suggestion, I'm bothering less to be able to load 32 bit kernels on 64-bit machines: changing the launcher for such case would be the easy part! In the absence of further objections, I'll commit it. Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com> -- =
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
2007 Apr 18
4
[patch 0/4] Clean up asm/bugs.h, identify_cpu() and update COMPAT_VDSO
Hi Andi, Four patches: - clean up asm/bugs.h, by moving all the C code into its own C file - split identify_cpu() into boot and secondary variants, so that boot-time setup functions can be marked __init - repost of the COMPAT_VDSO patches with a bit more robustness from unknown DT_tags, and functions marked __init, since all this is boot-time only setup. Thanks, J --