lkml.org 
[lkml]   [2023]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 10/10][HACK] objtool: Shrink reloc
Glorious hack, do not merge. Good for another ~850M of allyesconfig
savings.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
---
tools/objtool/include/objtool/elf.h | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

--- a/tools/objtool/include/objtool/elf.h
+++ b/tools/objtool/include/objtool/elf.h
@@ -71,17 +71,23 @@ struct reloc {
union {
GElf_Rela rela;
GElf_Rel rel;
+ struct {
+ u64 offset;
+ u64 __bar;
+ s64 addend;
+ };
};
struct section *sec;
struct symbol *sym;
struct list_head sym_reloc_entry;
- unsigned long offset;
- unsigned int type;
- s64 addend;
int idx;
+ unsigned short type;
bool jump_table_start;
};

+static_assert(offsetof(struct reloc, rela.r_offset) == offsetof(struct reloc, offset));
+static_assert(offsetof(struct reloc, rela.r_addend) == offsetof(struct reloc, addend));
+
#define ELF_HASH_BITS 20

struct elf {

\
 
 \ /
  Last update: 2023-03-27 00:15    [W:0.203 / U:1.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site