Displaying 20 results from an estimated 32 matches for "shn_ab".
Did you mean:
shn_abs
2012 Oct 15
2
[LLVMdev] LLD AbsoluteAtoms
On 10/15/12 12:01, Nick Kledzik wrote:
>
> On Oct 15, 2012, at 8:08 AM, Sidney Manning wrote:
>>
>> 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 make t...
2012 Oct 16
2
[LLVMdev] LLD AbsoluteAtoms
...gt;
> > On 10/15/12 12:01, Nick Kledzik wrote:
> >>
> >> On Oct 15, 2012, at 8:08 AM, Sidney Manning wrote:
> >>>
> >>> 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
&...
2012 Oct 15
0
[LLVMdev] LLD AbsoluteAtoms
...5, 2012, at 4:00 PM, Sid Manning wrote:
> On 10/15/12 12:01, Nick Kledzik wrote:
>>
>> On Oct 15, 2012, at 8:08 AM, Sidney Manning wrote:
>>>
>>> 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 make t...
2012 Oct 16
0
[LLVMdev] LLD AbsoluteAtoms
...e:
>
> > On 10/15/12 12:01, Nick Kledzik wrote:
> >>
> >> On Oct 15, 2012, at 8:08 AM, Sidney Manning wrote:
> >>>
> >>> 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 make t...
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 ma...
2012 Oct 15
0
[LLVMdev] LLD AbsoluteAtoms
On Oct 15, 2012, at 8:08 AM, Sidney Manning wrote:
>
> 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 make t...
2007 Apr 18
2
[RFC, PATCH] Fixup COMPAT_VDSO to work with CONFIG_PARAVIRT
...;
+ 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 +=3D VDSO_HIGH_BASE;
+ }
+ } else if (strcmp(secstrings+sechdrs[i].sh_name, ".dynamic") =3D=3D 0) {
+ Elf32_Dyn *dyn =3D (void *)hdr + sechdrs[i].sh_offset;
+ int tag;
+ while ((tag =3D (++dyn)->d_tag) !=3D DT_NULL)
+ switch(tag) {
+...
2007 Apr 18
2
[RFC, PATCH] Fixup COMPAT_VDSO to work with CONFIG_PARAVIRT
...;
+ 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 +=3D VDSO_HIGH_BASE;
+ }
+ } else if (strcmp(secstrings+sechdrs[i].sh_name, ".dynamic") =3D=3D 0) {
+ Elf32_Dyn *dyn =3D (void *)hdr + sechdrs[i].sh_offset;
+ int tag;
+ while ((tag =3D (++dyn)->d_tag) !=3D DT_NULL)
+ switch(tag) {
+...
2018 May 23
0
[PATCH v3 23/27] x86/modules: Adapt module loading for PIE support
...strings = (void *) ehdr + sechdrs[symtab->sh_link].sh_offset;
+ for (i = 0; i < symtab->sh_size/sizeof(Elf_Sym); i++) {
+ if (syms[i].st_shndx != SHN_UNDEF)
+ continue;
+ name = strings + syms[i].st_name;
+ if (!strcmp(name, "_GLOBAL_OFFSET_TABLE_")) {
+ syms[i].st_shndx = SHN_ABS;
+ break;
+ }
+ }
+ return 0;
+}
+#endif
+
void *module_alloc(unsigned long size)
{
void *p;
@@ -190,16 +358,20 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,
if ((s64)val != *(s32 *)loc)
goto overflow;
break;
+#ifdef CONFIG_X86_PIE
+ case R_X86_64_GOTPCREL:
+ val = module_e...
2007 Mar 05
7
[PATCH 2/10] linux 2.6.18: COMPAT_VDSO
...WARNING "vDSO section %u has unsupported type %08X\n", i, shdr->sh_type);
+ WARN_ON(shdr->sh_size);
+ break;
+ }
+ }
+ dynsym += (unsigned long)ehdr - new_base;
+ for(i = 1; i < ndynsym; ++i) {
+ Elf32_Sym *sym = (void *)(dynsym + i * szdynsym);
+
+ if (sym->st_shndx == SHN_ABS)
+ continue;
+ sym->st_value += new_base - old_base;
+ }
+#endif
+}
+#else
+#define relocate_vdso(ehdr, old, new, start, end) ((void)0)
+#endif
+
/*
* These symbols are defined by vsyscall.o to mark the bounds
* of the ELF DSO images included therein.
@@ -104,12 +245,16 @@ int __init sy...
2007 Mar 05
7
[PATCH 2/10] linux 2.6.18: COMPAT_VDSO
...WARNING "vDSO section %u has unsupported type %08X\n", i, shdr->sh_type);
+ WARN_ON(shdr->sh_size);
+ break;
+ }
+ }
+ dynsym += (unsigned long)ehdr - new_base;
+ for(i = 1; i < ndynsym; ++i) {
+ Elf32_Sym *sym = (void *)(dynsym + i * szdynsym);
+
+ if (sym->st_shndx == SHN_ABS)
+ continue;
+ sym->st_value += new_base - old_base;
+ }
+#endif
+}
+#else
+#define relocate_vdso(ehdr, old, new, start, end) ((void)0)
+#endif
+
/*
* These symbols are defined by vsyscall.o to mark the bounds
* of the ELF DSO images included therein.
@@ -104,12 +245,16 @@ int __init sy...
2007 Mar 05
7
[PATCH 2/10] linux 2.6.18: COMPAT_VDSO
...WARNING "vDSO section %u has unsupported type %08X\n", i, shdr->sh_type);
+ WARN_ON(shdr->sh_size);
+ break;
+ }
+ }
+ dynsym += (unsigned long)ehdr - new_base;
+ for(i = 1; i < ndynsym; ++i) {
+ Elf32_Sym *sym = (void *)(dynsym + i * szdynsym);
+
+ if (sym->st_shndx == SHN_ABS)
+ continue;
+ sym->st_value += new_base - old_base;
+ }
+#endif
+}
+#else
+#define relocate_vdso(ehdr, old, new, start, end) ((void)0)
+#endif
+
/*
* These symbols are defined by vsyscall.o to mark the bounds
* of the ELF DSO images included therein.
@@ -104,12 +245,16 @@ int __init sy...
2007 Apr 18
1
[RFC, PATCH 7/24] i386 Vmi memory hole
Create a configurable hole in the linear address space at the top
of memory. A more advanced interface is needed to negotiate how
much space the hypervisor is allowed to steal, but in the end, it
seems most likely that a fixed constant size will be chosen for
the compiled kernel, potentially propagated to an information
page used by paravirtual initialization to determine interface
compatibility.
2007 Apr 18
1
[RFC, PATCH 7/24] i386 Vmi memory hole
Create a configurable hole in the linear address space at the top
of memory. A more advanced interface is needed to negotiate how
much space the hypervisor is allowed to steal, but in the end, it
seems most likely that a fixed constant size will be chosen for
the compiled kernel, potentially propagated to an information
page used by paravirtual initialization to determine interface
compatibility.
2007 Jun 01
2
another RFC patch: bzImage with ELF payload
...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_addralign; /* Section alignment */
Elf64_Xword sh_entsize; /* Entry size if se...
2007 Jun 01
2
another RFC patch: bzImage with ELF payload
...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_addralign; /* Section alignment */
Elf64_Xword sh_entsize; /* Entry size if se...
2007 Apr 18
1
[PATCH, experimental] i386 Allow the fixmap to be relocated at boot time
...;
+ 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 +=3D VSYSCALL_RELOCATION;
+ }
+ } else if (strcmp(secstrings+sechdrs[i].sh_name, ".dynamic") =3D=3D 0) {
+ Elf32_Dyn *dyn =3D (void *)hdr + sechdrs[i].sh_offset;
+ int tag;
+ while ((tag =3D (++dyn)->d_tag) !=3D DT_NULL) {
+ if (tag =3...
2007 Apr 18
1
[PATCH, experimental] i386 Allow the fixmap to be relocated at boot time
...;
+ 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 +=3D VSYSCALL_RELOCATION;
+ }
+ } else if (strcmp(secstrings+sechdrs[i].sh_name, ".dynamic") =3D=3D 0) {
+ Elf32_Dyn *dyn =3D (void *)hdr + sechdrs[i].sh_offset;
+ int tag;
+ while ((tag =3D (++dyn)->d_tag) !=3D DT_NULL) {
+ if (tag =3...
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
--