[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <82ba7d85-5873-5da4-1125-0c3a9bbd927f@csgroup.eu>
Date: Tue, 30 Aug 2022 06:33:49 +0000
From: Christophe Leroy <christophe.leroy@...roup.eu>
To: Sathvika Vasireddy <sv@...ux.ibm.com>,
"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>
CC: "jpoimboe@...hat.com" <jpoimboe@...hat.com>,
"peterz@...radead.org" <peterz@...radead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"aik@...abs.ru" <aik@...abs.ru>,
"mpe@...erman.id.au" <mpe@...erman.id.au>,
"mingo@...hat.com" <mingo@...hat.com>,
"rostedt@...dmis.org" <rostedt@...dmis.org>,
"mbenes@...e.cz" <mbenes@...e.cz>,
"npiggin@...il.com" <npiggin@...il.com>,
"chenzhongjin@...wei.com" <chenzhongjin@...wei.com>,
"naveen.n.rao@...ux.vnet.ibm.com" <naveen.n.rao@...ux.vnet.ibm.com>
Subject: Re: [PATCH v2 13/16] objtool: Use macros to define arch specific
reloc types
Le 29/08/2022 à 07:52, Sathvika Vasireddy a écrit :
> Make relocation types architecture specific.
>
> Signed-off-by: Sathvika Vasireddy <sv@...ux.ibm.com>
Reviewed-by: Christophe Leroy <christophe.leroy@...roup.eu>
> ---
> 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 5298a143ceac..f1d055467926 100644
> --- a/tools/objtool/check.c
> +++ b/tools/objtool/check.c
> @@ -883,7 +883,7 @@ static int create_mcount_loc_sections(struct objtool_file *file)
> memset(loc, 0, addrsize);
>
> if (elf_add_reloc_to_insn(file->elf, sec, idx,
> - R_X86_64_64,
> + addrsize == sizeof(u64) ? R_ABS64 : R_ABS32,
> insn->sec, insn->offset))
> return -1;
>
Powered by blists - more mailing lists