Displaying 20 results from an estimated 21 matches for "sht_symtab".
2012 Oct 15
0
[LLVMdev] LLD AbsoluteAtoms
...gives:
> STT_FILE
> Conventionally, the symbol's name gives the name of the source file associated with the object file. A file symbol has STB_LOCAL binding and its section index is SHN_ABS. This symbol, if present, precedes the other STB_LOCAL symbols for the file. Symbol index 1 of the SHT_SYMTAB is an STT_FILE symbol representing the file itself. Conventionally, this symbols is followed by the files STT_SECTION symbols, and any global symbols that have been reduced to locals.
This sounds like these symbols are not really about absolute address (e.g. ROM), but a way to sneak meta data (lik...
2012 Oct 15
3
[LLVMdev] LLD AbsoluteAtoms
I think that absolute atoms will need something similar to,
"contentType" added.
SHN_ABS symbols can have different types, STT_OBJECT, STT_FILE and maybe
others. In order for the writer to tell it must have a way to reach
back and ask the atom what type of symbols caused it to be created. To
that end I added a contentType method to AbsoluteAtom and sprinkled
changes around to
2012 Oct 15
2
[LLVMdev] LLD AbsoluteAtoms
...>> STT_FILE
>> Conventionally, the symbol's name gives the name of the source file associated with the object file. A file symbol has STB_LOCAL binding and its section index is SHN_ABS. This symbol, if present, precedes the other STB_LOCAL symbols for the file. Symbol index 1 of the SHT_SYMTAB is an STT_FILE symbol representing the file itself. Conventionally, this symbols is followed by the files STT_SECTION symbols, and any global symbols that have been reduced to locals.
>
> This sounds like these symbols are not really about absolute address (e.g. ROM), but a way to sneak meta...
2012 Oct 16
2
[LLVMdev] LLD AbsoluteAtoms
...gt;>> Conventionally, the symbol's name gives the name of the source file
> associated with the object file. A file symbol has STB_LOCAL binding and
> its section index is SHN_ABS. This symbol, if present, precedes the other
> STB_LOCAL symbols for the file. Symbol index 1 of the SHT_SYMTAB is an
> STT_FILE symbol representing the file itself. Conventionally, this symbols
> is followed by the files STT_SECTION symbols, and any global symbols that
> have been reduced to locals.
> >>
> >> This sounds like these symbols are not really about absolute address
>...
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
2012 Oct 15
0
[LLVMdev] LLD AbsoluteAtoms
...> STT_FILE
>>> Conventionally, the symbol's name gives the name of the source file associated with the object file. A file symbol has STB_LOCAL binding and its section index is SHN_ABS. This symbol, if present, precedes the other STB_LOCAL symbols for the file. Symbol index 1 of the SHT_SYMTAB is an STT_FILE symbol representing the file itself. Conventionally, this symbols is followed by the files STT_SECTION symbols, and any global symbols that have been reduced to locals.
>>
>> This sounds like these symbols are not really about absolute address (e.g. ROM), but a way to sn...
2012 Oct 16
0
[LLVMdev] LLD AbsoluteAtoms
...STT_FILE
> >>> Conventionally, the symbol's name gives the name of the source file associated with the object file. A file symbol has STB_LOCAL binding and its section index is SHN_ABS. This symbol, if present, precedes the other STB_LOCAL symbols for the file. Symbol index 1 of the SHT_SYMTAB is an STT_FILE symbol representing the file itself. Conventionally, this symbols is followed by the files STT_SECTION symbols, and any global symbols that have been reduced to locals.
> >>
> >> This sounds like these symbols are not really about absolute address (e.g. ROM), but a...
2018 May 23
0
[PATCH v3 23/27] x86/modules: Adapt module loading for PIE support
...ty .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", mod->name);...
2007 Apr 18
1
[PATCH 0/2] Use a single loader for i386 and x86_64
...symtab section */
+ if (lseek(elf_fd, ehdr->e_shoff, SEEK_SET) < 0)
+ err(1, "Seeking to section headers");
+ if (read(elf_fd, sec, sizeof(sec)) != sizeof(sec))
+ err(1, "Reading section headers");
+
+ for (i = 0; i < ehdr->e_shnum; i++) {
+ if (sec[i].sh_type == SHT_SYMTAB) {
+ int ret = 0;
+ syms = malloc(sec[i].sh_size);
+ if (!syms)
+ err(1,"Not enough memory for symbol table");
+ ret = lseek(elf_fd, sec[i].sh_offset, SEEK_SET);
+ if (ret < 0)
+ err(1, "Seeking to symbol table");
+ ret = read(elf_fd, syms, sec[i].sh_size);...
2007 Apr 18
1
[PATCH 0/2] Use a single loader for i386 and x86_64
...symtab section */
+ if (lseek(elf_fd, ehdr->e_shoff, SEEK_SET) < 0)
+ err(1, "Seeking to section headers");
+ if (read(elf_fd, sec, sizeof(sec)) != sizeof(sec))
+ err(1, "Reading section headers");
+
+ for (i = 0; i < ehdr->e_shnum; i++) {
+ if (sec[i].sh_type == SHT_SYMTAB) {
+ int ret = 0;
+ syms = malloc(sec[i].sh_size);
+ if (!syms)
+ err(1,"Not enough memory for symbol table");
+ ret = lseek(elf_fd, sec[i].sh_offset, SEEK_SET);
+ if (ret < 0)
+ err(1, "Seeking to symbol table");
+ ret = read(elf_fd, syms, sec[i].sh_size);...
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
--
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
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 07/13] lguest64 loader
...symtab section */
+ if (lseek(elf_fd, ehdr->e_shoff, SEEK_SET) < 0)
+ err(1, "Seeking to section headers");
+ if (read(elf_fd, sec, sizeof(sec)) != sizeof(sec))
+ err(1, "Reading section headers");
+
+ for (i = 0; i < ehdr->e_shnum; i++) {
+ if (sec[i].sh_type == SHT_SYMTAB) {
+ int ret = 0;
+ syms = malloc(sec[i].sh_size);
+ if (!syms)
+ err(1,"Not enough memory for symbol table");
+ ret = lseek(elf_fd, sec[i].sh_offset, SEEK_SET);
+ if (ret < 0)
+ err(1, "Seeking to symbol table");
+ ret = read(elf_fd, syms, sec[i].sh_size);...