lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230208172245.922980544@infradead.org>
Date:   Wed, 08 Feb 2023 18:18:06 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     x86@...nel.org, jpoimboe@...hat.com, linux@...ssschuh.net
Cc:     linux-kernel@...r.kernel.org, peterz@...radead.org
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@...radead.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 {


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ