Displaying 20 results from an estimated 31 matches for "sh_type".
2018 May 23
0
[PATCH v3 23/27] x86/modules: Adapt module loading for PIE support
...ind 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);
+ return -ENOEXEC;
+ }
+ if (!syms) {
+ pr_err("%s: module symtab section missing\n",...
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
2020 Sep 16
2
Making library calls for obj2yaml functionalities
Hi All,
Following up on
https://lists.llvm.org/pipermail/llvm-dev/2020-July/143512.html, and
https://reviews.llvm.org/D85408, we would like to consider a design which
allows external tools to read the structured contents of the .bb_addr_map
section with library calls into an LLVM library. At the same time, we need
to have tools/obj2yaml tests in place for bb_addr_map. So it sounds like
the
2007 Mar 05
7
[PATCH 2/10] linux 2.6.18: COMPAT_VDSO
...;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;
+ switch(shdr->sh_type) {
+ case SHT_DYNAMIC:
+ case SHT_HASH:
+ case SHT_NOBITS:
+ case SHT_NOTE:
+ case SHT_PROGBITS:
+ case SHT_STRTAB:
+ case 0x6ffffffd: /* SHT_GNU_verdef */
+ case 0x6fffffff: /* SHT_GNU_versym */
+ break;
+ case SHT_DYNSYM:
+ BUG_ON(shdr->sh_entsize < sizeof(Elf32_Sym));
+ if (...
2007 Mar 05
7
[PATCH 2/10] linux 2.6.18: COMPAT_VDSO
...;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;
+ switch(shdr->sh_type) {
+ case SHT_DYNAMIC:
+ case SHT_HASH:
+ case SHT_NOBITS:
+ case SHT_NOTE:
+ case SHT_PROGBITS:
+ case SHT_STRTAB:
+ case 0x6ffffffd: /* SHT_GNU_verdef */
+ case 0x6fffffff: /* SHT_GNU_versym */
+ break;
+ case SHT_DYNSYM:
+ BUG_ON(shdr->sh_entsize < sizeof(Elf32_Sym));
+ if (...
2007 Mar 05
7
[PATCH 2/10] linux 2.6.18: COMPAT_VDSO
...;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;
+ switch(shdr->sh_type) {
+ case SHT_DYNAMIC:
+ case SHT_HASH:
+ case SHT_NOBITS:
+ case SHT_NOTE:
+ case SHT_PROGBITS:
+ case SHT_STRTAB:
+ case 0x6ffffffd: /* SHT_GNU_verdef */
+ case 0x6fffffff: /* SHT_GNU_versym */
+ break;
+ case SHT_DYNSYM:
+ BUG_ON(shdr->sh_entsize < sizeof(Elf32_Sym));
+ if (...
2020 Sep 18
2
Making library calls for obj2yaml functionalities
...ew SHT_* type for the new section? In
> general, it is bad design to rely on section names to distinguish between
> different kinds of sections - this requires the linker and other tools to
> have to do unnecessary string comparisons, which are slower and messier
> than switching on the sh_type field.
>
Yes, having a specific ELF section type would be great. Though I am
clueless about how this change will be received given that the
".stack_sizes" section also uses SHT_PROGBITS. I can definitely look into
it if I get some assurance.
James
>
> On Wed, 16 Sep 2020 at 22:...
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
2007 Jun 01
2
another RFC patch: bzImage with ELF payload
...PF_X 0x1
+#ifndef __ASSEMBLY__
struct elf32_phdr {
Elf32_Word p_type;
Elf32_Off p_offset;
@@ -251,6 +259,7 @@ struct elf64_phdr {
Elf64_Xword p_memsz; /* Segment size in memory */
Elf64_Xword p_align; /* 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_ad...
2007 Jun 01
2
another RFC patch: bzImage with ELF payload
...PF_X 0x1
+#ifndef __ASSEMBLY__
struct elf32_phdr {
Elf32_Word p_type;
Elf32_Off p_offset;
@@ -251,6 +259,7 @@ struct elf64_phdr {
Elf64_Xword p_memsz; /* Segment size in memory */
Elf64_Xword p_align; /* 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_ad...
2007 May 31
1
[patch rfc wip] first cut of ELF bzImage
...SEMBLY__
typedef struct elf32_phdr{
Elf32_Word p_type;
Elf32_Off p_offset;
@@ -250,6 +258,7 @@ typedef struct elf64_phdr {
Elf64_Xword p_memsz; /* Segment size in memory */
Elf64_Xword p_align; /* Segment alignment, file & memory */
} Elf64_Phdr;
+#endif /* __ASSEMBLY__ */
/* sh_type */
#define SHT_NULL 0
@@ -285,6 +294,7 @@ typedef struct elf64_phdr {
#define SHN_COMMON 0xfff2
#define SHN_HIRESERVE 0xffff
+#ifndef __ASSEMBLY__
typedef struct elf32_shdr {
Elf32_Word sh_name;
Elf32_Word sh_type;
@@ -310,6 +320,7 @@ typedef struct elf64_shdr {
Elf64_Xword sh_addr...
2007 May 31
1
[patch rfc wip] first cut of ELF bzImage
...SEMBLY__
typedef struct elf32_phdr{
Elf32_Word p_type;
Elf32_Off p_offset;
@@ -250,6 +258,7 @@ typedef struct elf64_phdr {
Elf64_Xword p_memsz; /* Segment size in memory */
Elf64_Xword p_align; /* Segment alignment, file & memory */
} Elf64_Phdr;
+#endif /* __ASSEMBLY__ */
/* sh_type */
#define SHT_NULL 0
@@ -285,6 +294,7 @@ typedef struct elf64_phdr {
#define SHN_COMMON 0xfff2
#define SHN_HIRESERVE 0xffff
+#ifndef __ASSEMBLY__
typedef struct elf32_shdr {
Elf32_Word sh_name;
Elf32_Word sh_type;
@@ -310,6 +320,7 @@ typedef struct elf64_shdr {
Elf64_Xword sh_addr...
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
--
2020 Nov 18
2
[LLD] Support DWARF64, debug_info "sorting"
On 2020-11-17, Igor Kudrin wrote:
>
>On 17.11.2020 14:05, Fāng-ruì Sòng wrote:
>>On Mon, Nov 16, 2020 at 10:42 PM Igor Kudrin <ikudrin at accesssoftek.com> wrote:
>>>
>>>On 14.11.2020 3:42, Fāng-ruì Sòng wrote:
>>>>For .debug_* in object files:
>>>>
>>>>DWARF32 -> SHT_PROGBITS (unchanged)
>>>>DWARF64 ->
2007 Jun 06
7
[PATCH RFC 0/7] proposed updates to boot protocol and paravirt booting
This series:
1. Updates the boot protocol to version 2.07
2. Clean up the existing build process, to get rid of tools/build and
make the linker do more heavy lifting
3. Make the bzImage payload an ELF file. The bootloader can extract
this as a naked ELF file by skipping over boot_params.setup_sects worth
of 16-bit setup code.
4. Update the boot_params to 2.07, and update the
2007 Jun 06
7
[PATCH RFC 0/7] proposed updates to boot protocol and paravirt booting
This series:
1. Updates the boot protocol to version 2.07
2. Clean up the existing build process, to get rid of tools/build and
make the linker do more heavy lifting
3. Make the bzImage payload an ELF file. The bootloader can extract
this as a naked ELF file by skipping over boot_params.setup_sects worth
of 16-bit setup code.
4. Update the boot_params to 2.07, and update the
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