search for: shdr

Displaying 20 results from an estimated 28 matches for "shdr".

Did you mean: hdr
2013 Dec 01
0
[PATCH v2 4/4] efi: PE file size differ from in-memory size
...file. + * Find the LOAD program header. Everything in this segment + * is copied verbatim to the output file. + * Although there may be several LOAD program headers, only + * one is currently copied. */ if (e32_hdr.e_ident[EI_CLASS] == ELFCLASS32) { - const char *shstrtab, *name; - Elf32_Shdr shdr; + Elf32_Phdr phdr; int i; - void *strtab; - - fseek(f_in, shoff, SEEK_SET); - - /* First find the strtab section */ - fseek(f_in, shstrndx * shentsize, SEEK_CUR); - fread(&shdr, sizeof(shdr), 1, f_in); - strtab = malloc(shdr.sh_size); - if (!strtab) { - fprintf(stderr, &quo...
2013 Nov 27
0
[PATCH 4/4] efi: PE file size differ from in-memory size
...file. + * Find the LOAD program header. Everything in this segment + * is copied verbatim to the output file. + * Although there may be several LOAD program headers, only + * one is currently copied. */ if (e32_hdr.e_ident[EI_CLASS] == ELFCLASS32) { - const char *shstrtab, *name; - Elf32_Shdr shdr; + Elf32_Phdr phdr; int i; - void *strtab; - - fseek(f_in, shoff, SEEK_SET); - - /* First find the strtab section */ - fseek(f_in, shstrndx * shentsize, SEEK_CUR); - fread(&shdr, sizeof(shdr), 1, f_in); - strtab = malloc(shdr.sh_size); - if (!strtab) { - fprintf(stderr, &quo...
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
2007 Mar 05
7
[PATCH 2/10] linux 2.6.18: COMPAT_VDSO
...break; + } + } + } + break; + case PT_GNU_EH_FRAME: + /* XXX */ + break; + default: + printk(KERN_WARNING "vDSO program header %u has unsupported type %08X\n", i, phdr->p_type); + WARN_ON(1); + break; + } + } + BUG_ON(ehdr->e_shentsize < sizeof(Elf32_Shdr)); + BUG_ON(ehdr->e_shnum >= SHN_LORESERVE); + for (i = 1; i < ehdr->e_shnum; ++i) { + Elf32_Shdr *shdr = (void *)((unsigned long)ehdr + ehdr->e_shoff + i * ehdr->e_shentsize); + + if (!(shdr->sh_flags & SHF_ALLOC)) + continue; + shdr->sh_addr += new_base - old_base...
2007 Mar 05
7
[PATCH 2/10] linux 2.6.18: COMPAT_VDSO
...break; + } + } + } + break; + case PT_GNU_EH_FRAME: + /* XXX */ + break; + default: + printk(KERN_WARNING "vDSO program header %u has unsupported type %08X\n", i, phdr->p_type); + WARN_ON(1); + break; + } + } + BUG_ON(ehdr->e_shentsize < sizeof(Elf32_Shdr)); + BUG_ON(ehdr->e_shnum >= SHN_LORESERVE); + for (i = 1; i < ehdr->e_shnum; ++i) { + Elf32_Shdr *shdr = (void *)((unsigned long)ehdr + ehdr->e_shoff + i * ehdr->e_shentsize); + + if (!(shdr->sh_flags & SHF_ALLOC)) + continue; + shdr->sh_addr += new_base - old_base...
2007 Mar 05
7
[PATCH 2/10] linux 2.6.18: COMPAT_VDSO
...break; + } + } + } + break; + case PT_GNU_EH_FRAME: + /* XXX */ + break; + default: + printk(KERN_WARNING "vDSO program header %u has unsupported type %08X\n", i, phdr->p_type); + WARN_ON(1); + break; + } + } + BUG_ON(ehdr->e_shentsize < sizeof(Elf32_Shdr)); + BUG_ON(ehdr->e_shnum >= SHN_LORESERVE); + for (i = 1; i < ehdr->e_shnum; ++i) { + Elf32_Shdr *shdr = (void *)((unsigned long)ehdr + ehdr->e_shoff + i * ehdr->e_shentsize); + + if (!(shdr->sh_flags & SHF_ALLOC)) + continue; + shdr->sh_addr += new_base - old_base...
2009 Sep 12
1
[PATCH] Let MEMDISK honor the quiet append option
...intf("gzip image: decompressed addr 0x%08x, len 0x%08x: ", + target, gzdatasize); *size_p = gzdatasize; *where_p = (uint32_t) unzip((void *)(where + offset), zbytes, @@ -435,7 +437,8 @@ int i; const char *p; - printf("command line: %s\n", shdr->cmdline); + if (!quiet) + printf("command line: %s\n", shdr->cmdline); offset = 0; if (CMD_HASDATA(p = getcmditem("offset")) && (v = atou(p))) @@ -627,14 +630,16 @@ hd_geometry.type = 0x10; /* ATAPI floppy, e.g. LS-120 */ } -...
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 --
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 --
2010 Jan 07
3
[Discussion] User controls for PowerManagement
...et for Gnome, you see the choice between every supported CPU speed, and an option for Automatic scaling. To make an application like this possible nouveau needs to communicate with users. I was thinking a procfs or sysfs node for outputting a readable table with possible modes like: 03: CPU=135MHz,Shdr=135MHz,Mem=135MHz,Vlt=0.8V,Fan=80%; ... the node name would be something like pm_supported. Another node named pm_current could output the current mode (for instance 03), and be writable to set the desired mode. Mode numbers will be the identifier given by pm_supported, found in the powermode tabl...
2018 Jan 04
1
Linker Option support for ELF
...                          2.     Type:                                       Object     Machine Architecture:                       IA_64     Elf File Version:                           1.     VMS Completion Code:                        SUCCESS ... SECTION DATA 2. (0002)                       SHDR$K_SHT_NOTE 00000000000000A8 (168.) bytes ".note" FileAddr Offset in Section 2. (0002) -------- --------------------------- 000000C0 00000000  Note Entry 0. 000000C0 00000000    Note Name Size: 0000000000000008       8. nhdr$q_nh_namesz 000000C8 00000008    Note Descriptor size: 00000000...
2009 Dec 07
3
[PATCH] memdisk: "safe hook" and mBFT
...the image isn''t copied yet! */ + safe_hook = (struct safe_hook *)(dpp + hptr->int13_offs); pptr = (struct patch_area *)(dpp + hptr->patch_offs); hptr = (struct memdisk_header *)dpp; @@ -1179,6 +1203,21 @@ void setup(const struct real_mode_args *rm_args_ptr) dpp = mempcpy(dpp, shdr->cmdline, cmdline_len); } + /* Re-fill the "safe hook" mBFT field with the physical address */ + safe_hook->mBFT += (uint32_t)hptr; + + /* Complete the mBFT */ + { + struct mBFT *mBFT = (struct mBFT *)safe_hook->mBFT; + + mBFT->acpi.signature[0] = ''...
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
2018 May 23
33
[PATCH v3 00/27] x86: PIE support and option to extend KASLR randomization
Changes: - patch v3: - Update on message to describe longer term PIE goal. - Minor change on ftrace if condition. - Changed code using xchgq. - 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
2017 Oct 11
32
[PATCH v1 00/27] x86: PIE support and option to extend KASLR randomization
Changes: - 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 dynamic relocation space on mapped memory. It also simplifies the relocation process. - Move the start the module section next to the kernel. Remove the need for -mcmodel=large on modules. Extends
2017 Oct 11
32
[PATCH v1 00/27] x86: PIE support and option to extend KASLR randomization
Changes: - 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 dynamic relocation space on mapped memory. It also simplifies the relocation process. - Move the start the module section next to the kernel. Remove the need for -mcmodel=large on modules. Extends
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