Displaying 13 results from an estimated 13 matches for "elfw".
Did you mean:
elf
2017 Dec 09
2
Reducing code size of Position Independent Executables (PIE) by shrinking the size of dynamic relocations section
...on:
>
> typedef struct
> {
> Elf64_Xword r_data; /* jump and bitmap for relative relocations */
> } Elf64_Relrz;
>
> #define ELF64_R_JUMP(val) ((val) >> 56)
> #define ELF64_R_BITS(val) ((val) & 0xffffffffffffff)
>
> #ifdef DO_RELRZ
> {
> ElfW(Addr) offset = 0;
> for (; relative < end; ++relative)
> {
> ElfW(Addr) jump = ELFW(R_JUMP) (relative->r_data);
> ElfW(Addr) bits = ELFW(R_BITS) (relative->r_data);
> offset += jump * sizeof(ElfW(Addr));
> if (jump == 0)
>...
2017 May 08
4
Reducing code size of Position Independent Executables (PIE) by shrinking the size of dynamic relocations section
+llvm-dev
Discussion here: https://sourceware.org/ml/gnu-gabi/2017-q2/msg00000.html
On Tue, May 2, 2017 at 10:17 AM, Suprateeka R Hegde
<hegdesmailbox at gmail.com> wrote:
> On 02-May-2017 12:05 AM, Florian Weimer wrote:
>> On 05/01/2017 08:28 PM, Suprateeka R Hegde wrote:
>>> So the ratio shows ~96% is RELATIVE reloc. And only ~4% others. This is
>>> not the
2017 Dec 07
0
Reducing code size of Position Independent Executables (PIE) by shrinking the size of dynamic relocations section
...best described by showing the code for decoding the
section:
typedef struct
{
Elf64_Xword r_data; /* jump and bitmap for relative relocations */
} Elf64_Relrz;
#define ELF64_R_JUMP(val) ((val) >> 56)
#define ELF64_R_BITS(val) ((val) & 0xffffffffffffff)
#ifdef DO_RELRZ
{
ElfW(Addr) offset = 0;
for (; relative < end; ++relative)
{
ElfW(Addr) jump = ELFW(R_JUMP) (relative->r_data);
ElfW(Addr) bits = ELFW(R_BITS) (relative->r_data);
offset += jump * sizeof(ElfW(Addr));
if (jump == 0)
{
++relative;...
2018 May 23
0
[PATCH v3 18/27] xen: Adapt assembly for PIE support
...x86/xen/xen-pvh.S | 13 +++++++++----
3 files changed, 30 insertions(+), 10 deletions(-)
diff --git a/arch/x86/tools/relocs.c b/arch/x86/tools/relocs.c
index a35cc337f883..29283ad3950f 100644
--- a/arch/x86/tools/relocs.c
+++ b/arch/x86/tools/relocs.c
@@ -832,6 +832,16 @@ static int is_percpu_sym(ElfW(Sym) *sym, const char *symname)
strncmp(symname, "init_per_cpu_", 13);
}
+/*
+ * Check if the 32-bit relocation is within the xenpvh 32-bit code.
+ * If so, ignores it.
+ */
+static int is_in_xenpvh_assembly(ElfW(Addr) offset)
+{
+ ElfW(Sym) *sym = sym_lookup("pvh_start_xen&quo...
2017 Dec 11
2
Reducing code size of Position Independent Executables (PIE) by shrinking the size of dynamic relocations section
.../* jump and bitmap for relative relocations */
>>> } Elf64_Relrz;
>>>
>>> #define ELF64_R_JUMP(val) ((val) >> 56)
>>> #define ELF64_R_BITS(val) ((val) & 0xffffffffffffff)
>>>
>>> #ifdef DO_RELRZ
>>> {
>>> ElfW(Addr) offset = 0;
>>> for (; relative < end; ++relative)
>>> {
>>> ElfW(Addr) jump = ELFW(R_JUMP) (relative->r_data);
>>> ElfW(Addr) bits = ELFW(R_BITS) (relative->r_data);
>>> offset += jump * sizeof(ElfW(Addr)...
2011 Jun 20
2
Re: Help compiling an older version of wine on 64 bit Fedora 14
...nepatch.diff":
Code:
---
loader/preloader.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/loader/preloader.c b/loader/preloader.c
index 83a5172..2dc2872 100644
--- a/loader/preloader.c
+++ b/loader/preloader.c
@@ -519,7 +519,7 @@ static void set_auxiliary_values( ElfW(auxv_t) *av, const ElfW(auxv_t) *new_av,
}
else if (new_count < delete_count) /* get rid of unused values */
{
- int len = (char *)(av + av_count + 1) - dst;
+ int len = (char *)(av + av_count + 1) - src;
for (i = len - 1; i >= 0; i--) dst[i] = src[i];...
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