search for: sh_name

Displaying 20 results from an estimated 48 matches for "sh_name".

2007 Apr 18
2
[RFC, PATCH] Fixup COMPAT_VDSO to work with CONFIG_PARAVIRT
...drs =3D (void *)hdr + hdr->e_shoff; + secstrings =3D (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; + + for (i =3D 1; i < hdr->e_shnum; i++) { + if (!(sechdrs[i].sh_flags & SHF_ALLOC)) + continue; + + sechdrs[i].sh_addr +=3D VDSO_HIGH_BASE; + if (strcmp(secstrings+sechdrs[i].sh_name, ".dynsym") =3D=3D 0) { + Elf32_Sym *sym =3D (void *)hdr + sechdrs[i].sh_offset; + n =3D sechdrs[i].sh_size / sizeof(*sym); + for (j =3D 1; j < n; j++) { + int ndx =3D sym[j].st_shndx; + if (ndx =3D=3D SHN_UNDEF || ndx =3D=3D SHN_ABS) + continue; + sym[j].st_value...
2007 Apr 18
2
[RFC, PATCH] Fixup COMPAT_VDSO to work with CONFIG_PARAVIRT
...drs =3D (void *)hdr + hdr->e_shoff; + secstrings =3D (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; + + for (i =3D 1; i < hdr->e_shnum; i++) { + if (!(sechdrs[i].sh_flags & SHF_ALLOC)) + continue; + + sechdrs[i].sh_addr +=3D VDSO_HIGH_BASE; + if (strcmp(secstrings+sechdrs[i].sh_name, ".dynsym") =3D=3D 0) { + Elf32_Sym *sym =3D (void *)hdr + sechdrs[i].sh_offset; + n =3D sechdrs[i].sh_size / sizeof(*sym); + for (j =3D 1; j < n; j++) { + int ndx =3D sym[j].st_shndx; + if (ndx =3D=3D SHN_UNDEF || ndx =3D=3D SHN_ABS) + continue; + sym[j].st_value...
2017 Oct 04
1
[PATCH 11/13] x86/paravirt: Add paravirt alternatives infrastructure
...= NULL, *orc_ip = NULL; char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) { @@ -222,6 +222,8 @@ int module_finalize(const Elf_Ehdr *hdr, text = s; if (!strcmp(".altinstructions", secstrings + s->sh_name)) alt = s; + if (!strcmp(".pv_altinstructions", secstrings + s->sh_name)) + pv_alt = s; if (!strcmp(".smp_locks", secstrings + s->sh_name)) locks = s; if (!strcmp(".parainstructions", secstrings + s->sh_name)) @@ -237,6 +239,11 @@ int module_f...
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
2013 Dec 01
0
[PATCH v2 4/4] efi: PE file size differ from in-memory size
...- fprintf(stderr, "Failed to read section table\n"); - exit(EXIT_FAILURE); - } + /* Find the first LOAD program header */ + for (i = 0; i < phnum; i++) { + fseek(f_in, phoff + i * phentsize, SEEK_SET); + fread(&phdr, sizeof(phdr), 1, f_in); - name = strtab + shdr.sh_name; - if (!strcmp(name, ".bss")) + if (phdr.p_type == PT_LOAD) break; } - if (i == shnum) { - fprintf(stderr, "Failed to find .bss section\n"); - exit(EXIT_FAILURE); - } - - datasz = shdr.sh_offset; - } - else if (e32_hdr.e_ident[EI_CLASS] == ELFCLASS64) { - c...
2013 Nov 27
0
[PATCH 4/4] efi: PE file size differ from in-memory size
...- fprintf(stderr, "Failed to read section table\n"); - exit(EXIT_FAILURE); - } + /* Find the first LOAD program header */ + for (i = 0; i < phnum; i++) { + fseek(f_in, phoff + i * phentsize, SEEK_SET); + fread(&phdr, sizeof(phdr), 1, f_in); - name = strtab + shdr.sh_name; - if (!strcmp(name, ".bss")) + if (phdr.p_type == PT_LOAD) break; } - if (i == shnum) { - fprintf(stderr, "Failed to find .bss section\n"); - exit(EXIT_FAILURE); - } - - datasz = shdr.sh_offset; - } - else if (e32_hdr.e_ident[EI_CLASS] == ELFCLASS64) { - c...
2023 Jun 08
3
[RFC PATCH 0/3] x86/paravirt: Get rid of paravirt patching
This is a small series getting rid of paravirt patching by switching completely to alternative patching for the same functionality. The basic idea is to add the capability to switch from indirect to direct calls via a special alternative patching option. This removes _some_ of the paravirt macro maze, but most of it needs to stay due to the need of hiding the call instructions from the compiler
2023 Jun 08
3
[RFC PATCH 0/3] x86/paravirt: Get rid of paravirt patching
This is a small series getting rid of paravirt patching by switching completely to alternative patching for the same functionality. The basic idea is to add the capability to switch from indirect to direct calls via a special alternative patching option. This removes _some_ of the paravirt macro maze, but most of it needs to stay due to the need of hiding the call instructions from the compiler
2007 Apr 18
1
[PATCH, experimental] i386 Allow the fixmap to be relocated at boot time
...3D (void *)hdr + hdr->e_shoff; + secstrings =3D (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; + + for (i =3D 1; i < hdr->e_shnum; i++) { + if (!(sechdrs[i].sh_flags & SHF_ALLOC)) + continue; + + sechdrs[i].sh_addr +=3D VSYSCALL_RELOCATION; + if (strcmp(secstrings+sechdrs[i].sh_name, ".dynsym") =3D=3D 0) { + Elf32_Sym *sym =3D (void *)hdr + sechdrs[i].sh_offset; + n =3D sechdrs[i].sh_size / sizeof(*sym); + for (j =3D 1; j < n; j++) { + int ndx =3D sym[j].st_shndx; + if (ndx =3D=3D SHN_UNDEF || ndx =3D=3D SHN_ABS) + continue; + sym[j].st_value...
2007 Apr 18
1
[PATCH, experimental] i386 Allow the fixmap to be relocated at boot time
...3D (void *)hdr + hdr->e_shoff; + secstrings =3D (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; + + for (i =3D 1; i < hdr->e_shnum; i++) { + if (!(sechdrs[i].sh_flags & SHF_ALLOC)) + continue; + + sechdrs[i].sh_addr +=3D VSYSCALL_RELOCATION; + if (strcmp(secstrings+sechdrs[i].sh_name, ".dynsym") =3D=3D 0) { + Elf32_Sym *sym =3D (void *)hdr + sechdrs[i].sh_offset; + n =3D sechdrs[i].sh_size / sizeof(*sym); + for (j =3D 1; j < n; j++) { + int ndx =3D sym[j].st_shndx; + if (ndx =3D=3D SHN_UNDEF || ndx =3D=3D SHN_ABS) + continue; + sym[j].st_value...
2008 Oct 21
5
Why could I get function names from a stripped exec?
Hello, all experts. When I use pid provider, my Dscript with -F option output the codepath with flowindent as you know, e.g. -> main -> f1 -> f2 however I realized that the exec file I used at that time was stripped. Does anyone know the reason why I could see the function names? Thanks in advance. -- This message posted from opensolaris.org
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 Apr 18
1
[PATCH] (with benchmarks) binary patching of paravirt_ops call sites
...ocks = NULL, + *para = NULL; char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) { @@ -118,6 +119,8 @@ int module_finalize(const Elf_Ehdr *hdr, alt = s; if (!strcmp(".smp_locks", secstrings + s->sh_name)) locks= s; + if (!strcmp(".parainstructions", secstrings + s->sh_name)) + para = s; } if (alt) { @@ -132,6 +135,10 @@ int module_finalize(const Elf_Ehdr *hdr, lseg, lseg + locks->sh_size, tseg, tseg + text->sh_size); } + if (para) { + void *as...
2007 Apr 18
1
[PATCH] (with benchmarks) binary patching of paravirt_ops call sites
...ocks = NULL, + *para = NULL; char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) { @@ -118,6 +119,8 @@ int module_finalize(const Elf_Ehdr *hdr, alt = s; if (!strcmp(".smp_locks", secstrings + s->sh_name)) locks= s; + if (!strcmp(".parainstructions", secstrings + s->sh_name)) + para = s; } if (alt) { @@ -132,6 +135,10 @@ int module_finalize(const Elf_Ehdr *hdr, lseg, lseg + locks->sh_size, tseg, tseg + text->sh_size); } + if (para) { + void *as...
2018 May 23
0
[PATCH v3 23/27] x86/modules: Adapt module loading for PIE support
...lf_Shdr *symtab = NULL; + Elf64_Sym *syms = NULL; + char *strings, *name; + int i; + + /* + * Find the empty .got section so we can expand it to store the PLT + * entries. Record the symtab address as well. + */ + for (i = 0; i < ehdr->e_shnum; i++) { + if (!strcmp(secstrings + sechdrs[i].sh_name, ".got")) { + mod->arch.core.got = sechdrs + i; + } else if (sechdrs[i].sh_type == SHT_SYMTAB) { + symtab = sechdrs + i; + syms = (Elf64_Sym *)symtab->sh_addr; + } + } + + if (!mod->arch.core.got) { + pr_err("%s: module GOT section missing\n", mod->name); +...
2017 Oct 04
31
[PATCH 00/13] x86/paravirt: Make pv ops code generation more closely match reality
This changes the pv ops code generation to more closely match reality. For example, instead of: callq *0xffffffff81e3a400 (pv_irq_ops.save_fl) vmlinux will now show: pushfq pop %rax nop nop nop nop nop which is what the runtime version of the code will show in most cases. This idea was suggested by Andy Lutomirski. The benefits are: - For the most common runtime cases
2017 Oct 04
31
[PATCH 00/13] x86/paravirt: Make pv ops code generation more closely match reality
This changes the pv ops code generation to more closely match reality. For example, instead of: callq *0xffffffff81e3a400 (pv_irq_ops.save_fl) vmlinux will now show: pushfq pop %rax nop nop nop nop nop which is what the runtime version of the code will show in most cases. This idea was suggested by Andy Lutomirski. The benefits are: - For the most common runtime cases
2007 Jun 01
2
another RFC patch: bzImage with ELF payload
...gn; /* Segment alignment, file & memory */ }; +#endif /* __ASSEMBLY__ */ /* sh_type */ #define SHT_NULL 0 @@ -285,7 +294,8 @@ struct elf64_phdr { #define SHN_ABS 0xfff1 #define SHN_COMMON 0xfff2 #define SHN_HIRESERVE 0xffff - + +#ifndef __ASSEMBLY__ struct elf32_shdr { Elf32_Word sh_name; Elf32_Word sh_type; @@ -311,6 +321,7 @@ struct elf64_shdr { Elf64_Xword sh_addralign; /* Section alignment */ Elf64_Xword sh_entsize; /* Entry size if section holds table */ }; +#endif /* __ASSEMBLY__ */ #define EI_MAG0 0 /* e_ident[] indexes */ #define EI_MAG1 1 @@ -344,6 +355,7...
2007 Jun 01
2
another RFC patch: bzImage with ELF payload
...gn; /* Segment alignment, file & memory */ }; +#endif /* __ASSEMBLY__ */ /* sh_type */ #define SHT_NULL 0 @@ -285,7 +294,8 @@ struct elf64_phdr { #define SHN_ABS 0xfff1 #define SHN_COMMON 0xfff2 #define SHN_HIRESERVE 0xffff - + +#ifndef __ASSEMBLY__ struct elf32_shdr { Elf32_Word sh_name; Elf32_Word sh_type; @@ -311,6 +321,7 @@ struct elf64_shdr { Elf64_Xword sh_addralign; /* Section alignment */ Elf64_Xword sh_entsize; /* Entry size if section holds table */ }; +#endif /* __ASSEMBLY__ */ #define EI_MAG0 0 /* e_ident[] indexes */ #define EI_MAG1 1 @@ -344,6 +355,7...
2008 Dec 12
5
[PATCH 0/5] ia64/pv_ops, xen: binary patch optimization TAKE 2
This patch set is intended for the next merge window. They are just enhancements of the already merged patches or ia64 porting from x86 paravirt techniques and that their quality is enough for merge. This patch set is for binary patch optimization for paravirt_ops. The binary patch optimization is important on native case because the paravirt_ops overhead can be reduced by converting indirect