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: <20220624183238.388144-8-sv@linux.ibm.com>
Date:   Sat, 25 Jun 2022 00:02:33 +0530
From:   Sathvika Vasireddy <sv@...ux.ibm.com>
To:     linuxppc-dev@...ts.ozlabs.org
Cc:     jpoimboe@...hat.com, peterz@...radead.org,
        linux-kernel@...r.kernel.org, aik@...abs.ru, mpe@...erman.id.au,
        christophe.leroy@...roup.eu, mingo@...hat.com, rostedt@...dmis.org,
        naveen.n.rao@...ux.vnet.ibm.com, sv@...ux.ibm.com, mbenes@...e.cz,
        benh@...nel.crashing.org, paulus@...ba.org
Subject: [RFC PATCH v3 07/12] objtool: Use macros to define arch specific reloc types

Make relocation types architecture specific.

Signed-off-by: Sathvika Vasireddy <sv@...ux.ibm.com>
---
 tools/objtool/arch/x86/include/arch/elf.h | 2 ++
 tools/objtool/check.c                     | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/objtool/arch/x86/include/arch/elf.h b/tools/objtool/arch/x86/include/arch/elf.h
index 69cc4264b28a..ac14987cf687 100644
--- a/tools/objtool/arch/x86/include/arch/elf.h
+++ b/tools/objtool/arch/x86/include/arch/elf.h
@@ -2,5 +2,7 @@
 #define _OBJTOOL_ARCH_ELF
 
 #define R_NONE R_X86_64_NONE
+#define R_ABS64 R_X86_64_64
+#define R_ABS32 R_X86_64_32
 
 #endif /* _OBJTOOL_ARCH_ELF */
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 98e869721bc4..88f68269860e 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -834,7 +834,7 @@ static int create_mcount_loc_sections(struct objtool_file *file)
 		memset(loc, 0, size);
 
 		if (elf_add_reloc_to_insn(file->elf, sec, idx,
-					  R_X86_64_64,
+					  size == sizeof(u64) ? R_ABS64 : R_ABS32,
 					  insn->sec, insn->offset))
 			return -1;
 
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ