search for: ei_class

Displaying 20 results from an estimated 23 matches for "ei_class".

2013 Dec 01
0
[PATCH v2 4/4] efi: PE file size differ from in-memory size
...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 = e32_hdr....
2013 Nov 27
0
[PATCH 4/4] efi: PE file size differ from in-memory size
...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 = e32_hdr....
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
2015 Dec 15
2
How do I get ABI information to a subclass of MCELFObjectTargetWriter::GetLocType?
I am implementing a defined, but currently unimplemented by LLVM, ABI. This ABI differs from an existing ABI in its ELF object format by implementing a subset of an existing ABI, but encoded differently and by setting the e_ident EI_CLASS field. I am trying to use MCTargetOptions::getABIName to set a boolean in the modified subclass of MCELFObjectTargetWriter to indicate which relocation encoding to use. As far as I can determine by source examination and judicious use of a debugger there isn't a simple path from the command lin...
2015 Dec 17
2
How do I get ABI information to a subclass of MCELFObjectTargetWriter::GetLocType?
...ote: Hi Anson, I've been working on similar problems in MIPS. We have several problems with the same root cause but the most relevant is that our N32 ABI implementation behaves too much like N64. We get lots of important N32 details wrong with one of the biggest being that we get the wrong EI_CLASS because we derive it from the triple and not the ABI (which is currently unavailable to the relevant object). I have three patches that make a start on a general solution for this kind of problem (http://reviews.llvm.org/D13858, http://reviews.llvm.org/D13860, and http://reviews.llvm.org/D13863)....
2007 Aug 29
0
[PATCH 4/5] xc_core: documentation update
...urrently x86 full virtualized domain and ia64 domain. @@ -225,6 +231,8 @@ Currently only (major, minor) = (0, 1) i (0, 1) update - .xen_p2m, .xen_pfn section + Invalid pfn/gmfn. +- .xen_p2m, .xen_pfn section Arrays must be in pfn ascending order for efficient looking up. - EI_CLASS member of elf header was changed to ELFCLASS64 independent of architecture. This is mainly for x86_32pae. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
2008 Oct 20
0
PATCH[001/001]: mboot.c: prefer ELF header over multiboot header
...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"); - exit(1); - } if (ehdr->e_phoff + e...
2003 Jan 07
1
klibc-0.72 released
This adds [f]getc() and fgets() for parsing config files. Probably hard to avoid. Still trying to decide if I actually want to add system() or not. -hpa
2007 Mar 05
7
[PATCH 2/10] linux 2.6.18: COMPAT_VDSO
...+ } +#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 < sizeof(*ehdr)); + ehdr->e_entry += new_base - old_base; + BUG_ON(ehdr->e_phentsize < sizeof(Elf32_Phdr)); + for (i = 0; i < ehdr->e_phnum; ++i) { + Elf32_Phdr *phdr = (void *)((unsig...
2007 Mar 05
7
[PATCH 2/10] linux 2.6.18: COMPAT_VDSO
...+ } +#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 < sizeof(*ehdr)); + ehdr->e_entry += new_base - old_base; + BUG_ON(ehdr->e_phentsize < sizeof(Elf32_Phdr)); + for (i = 0; i < ehdr->e_phnum; ++i) { + Elf32_Phdr *phdr = (void *)((unsig...
2007 Mar 05
7
[PATCH 2/10] linux 2.6.18: COMPAT_VDSO
...+ } +#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 < sizeof(*ehdr)); + ehdr->e_entry += new_base - old_base; + BUG_ON(ehdr->e_phentsize < sizeof(Elf32_Phdr)); + for (i = 0; i < ehdr->e_phnum; ++i) { + Elf32_Phdr *phdr = (void *)((unsig...
2007 Apr 18
1
[PATCH 0/2] Use a single loader for i386 and x86_64
...struct device *i; - u32 *lenp; + unsigned long *lenp; struct iovec iov[LGUEST_MAX_DMA_SECTIONS]; unsigned num = 0; @@ -916,20 +1068,45 @@ static void handle_input(int fd, int chi } } +static unsigned long load_elf_header(unsigned char *elf_nident) +{ + errno = 0; + switch (*(elf_nident+EI_CLASS)) { + case ELFCLASS32: + finish = finish32; + if (memcmp(elf_nident, ELFMAG, SELFMAG) == 0) + return (unsigned long)map_elf32; + else + return (unsigned long)load_bzimage; + break; + case ELFCLASS64: + finish = finish64; + if (memcmp(elf_nident, ELFMAG, SELFMAG) == 0) + retur...
2007 Apr 18
1
[PATCH 0/2] Use a single loader for i386 and x86_64
...struct device *i; - u32 *lenp; + unsigned long *lenp; struct iovec iov[LGUEST_MAX_DMA_SECTIONS]; unsigned num = 0; @@ -916,20 +1068,45 @@ static void handle_input(int fd, int chi } } +static unsigned long load_elf_header(unsigned char *elf_nident) +{ + errno = 0; + switch (*(elf_nident+EI_CLASS)) { + case ELFCLASS32: + finish = finish32; + if (memcmp(elf_nident, ELFMAG, SELFMAG) == 0) + return (unsigned long)map_elf32; + else + return (unsigned long)load_bzimage; + break; + case ELFCLASS64: + finish = finish64; + if (memcmp(elf_nident, ELFMAG, SELFMAG) == 0) + retur...
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 Jun 20
9
[PATCH 0/9] x86 boot protocol updates
[ This patch depends on the cross-architecture ELF cleanup patch. ] This series updates the boot protocol to 2.07 and uses it to implement paravirtual booting. This allows the bootloader to tell the kernel what kind of hardware/pseudo-hardware environment it's coming up under, and the kernel can use the appropriate boot sequence code. Specifically: - Update the boot protocol to 2.07, which
2007 Jun 20
9
[PATCH 0/9] x86 boot protocol updates
[ This patch depends on the cross-architecture ELF cleanup patch. ] This series updates the boot protocol to 2.07 and uses it to implement paravirtual booting. This allows the bootloader to tell the kernel what kind of hardware/pseudo-hardware environment it's coming up under, and the kernel can use the appropriate boot sequence code. Specifically: - Update the boot protocol to 2.07, which
2018 Mar 13
32
[PATCH v2 00/27] x86: PIE support and option to extend KASLR randomization
Changes: - patch v2: - Adapt patch to work post KPTI and compiler changes - Redo all performance testing with latest configs and compilers - Simplify mov macro on PIE (MOVABS now) - Reduce GOT footprint - patch v1: - Simplify ftrace implementation. - Use gcc mstack-protector-guard-reg=%gs with PIE when possible. - rfc v3: - Use --emit-relocs instead of -pie to reduce
2018 Mar 13
32
[PATCH v2 00/27] x86: PIE support and option to extend KASLR randomization
Changes: - patch v2: - Adapt patch to work post KPTI and compiler changes - Redo all performance testing with latest configs and compilers - Simplify mov macro on PIE (MOVABS now) - Reduce GOT footprint - patch v1: - Simplify ftrace implementation. - Use gcc mstack-protector-guard-reg=%gs with PIE when possible. - rfc v3: - Use --emit-relocs instead of -pie to reduce
2017 Oct 04
28
x86: PIE support and option to extend KASLR randomization
These patches make the changes necessary to build the kernel as Position Independent Executable (PIE) on x86_64. A PIE kernel can be relocated below the top 2G of the virtual address space. It allows to optionally extend the KASLR randomization range from 1G to 3G. Thanks a lot to Ard Biesheuvel & Kees Cook on their feedback on compiler changes, PIE support and KASLR in general. Thanks to
2017 Oct 04
28
x86: PIE support and option to extend KASLR randomization
These patches make the changes necessary to build the kernel as Position Independent Executable (PIE) on x86_64. A PIE kernel can be relocated below the top 2G of the virtual address space. It allows to optionally extend the KASLR randomization range from 1G to 3G. Thanks a lot to Ard Biesheuvel & Kees Cook on their feedback on compiler changes, PIE support and KASLR in general. Thanks to