All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chen Zhongjin <chenzhongjin@huawei.com>
To: <linux-kernel@vger.kernel.org>, <linux-arch@vger.kernel.org>,
	<linuxppc-dev@lists.ozlabs.org>,
	<linux-arm-kernel@lists.infradead.org>, <jpoimboe@kernel.org>,
	<peterz@infradead.org>
Cc: <tglx@linutronix.de>, <mingo@redhat.com>,
	<dave.hansen@linux.intel.com>, <x86@kernel.org>, <hpa@zytor.com>,
	<arnd@arndb.de>
Subject: [PATCH v2 5/5] objtool: use arch_jump_destination in read_intra_function_calls
Date: Wed, 22 Jun 2022 18:13:44 +0800	[thread overview]
Message-ID: <20220622101344.38002-6-chenzhongjin@huawei.com> (raw)
In-Reply-To: <20220622101344.38002-1-chenzhongjin@huawei.com>

Now we use arch_jump_destination() instead of offset + len + immediate
for jump destination.
But in read_intra_function_calls it didn't get changed. Fix it.

Signed-off-by: Chen Zhongjin <chenzhongjin@huawei.com>
---
 tools/objtool/check.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 11ab13fd99fd..35d0a1bc4279 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -2127,7 +2127,7 @@ static int read_intra_function_calls(struct objtool_file *file)
 		 */
 		insn->type = INSN_JUMP_UNCONDITIONAL;
 
-		dest_off = insn->offset + insn->len + insn->immediate;
+		dest_off = arch_jump_destination(insn);
 		insn->jump_dest = find_insn(file, insn->sec, dest_off);
 		if (!insn->jump_dest) {
 			WARN_FUNC("can't find call dest at %s+0x%lx",
-- 
2.17.1


WARNING: multiple messages have this Message-ID (diff)
From: Chen Zhongjin <chenzhongjin@huawei.com>
To: <linux-kernel@vger.kernel.org>, <linux-arch@vger.kernel.org>,
	<linuxppc-dev@lists.ozlabs.org>,
	<linux-arm-kernel@lists.infradead.org>, <jpoimboe@kernel.org>,
	<peterz@infradead.org>
Cc: x86@kernel.org, arnd@arndb.de, dave.hansen@linux.intel.com,
	mingo@redhat.com, hpa@zytor.com, tglx@linutronix.de
Subject: [PATCH v2 5/5] objtool: use arch_jump_destination in read_intra_function_calls
Date: Wed, 22 Jun 2022 18:13:44 +0800	[thread overview]
Message-ID: <20220622101344.38002-6-chenzhongjin@huawei.com> (raw)
In-Reply-To: <20220622101344.38002-1-chenzhongjin@huawei.com>

Now we use arch_jump_destination() instead of offset + len + immediate
for jump destination.
But in read_intra_function_calls it didn't get changed. Fix it.

Signed-off-by: Chen Zhongjin <chenzhongjin@huawei.com>
---
 tools/objtool/check.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 11ab13fd99fd..35d0a1bc4279 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -2127,7 +2127,7 @@ static int read_intra_function_calls(struct objtool_file *file)
 		 */
 		insn->type = INSN_JUMP_UNCONDITIONAL;
 
-		dest_off = insn->offset + insn->len + insn->immediate;
+		dest_off = arch_jump_destination(insn);
 		insn->jump_dest = find_insn(file, insn->sec, dest_off);
 		if (!insn->jump_dest) {
 			WARN_FUNC("can't find call dest at %s+0x%lx",
-- 
2.17.1


WARNING: multiple messages have this Message-ID (diff)
From: Chen Zhongjin <chenzhongjin@huawei.com>
To: <linux-kernel@vger.kernel.org>, <linux-arch@vger.kernel.org>,
	<linuxppc-dev@lists.ozlabs.org>,
	<linux-arm-kernel@lists.infradead.org>, <jpoimboe@kernel.org>,
	<peterz@infradead.org>
Cc: <tglx@linutronix.de>, <mingo@redhat.com>,
	<dave.hansen@linux.intel.com>, <x86@kernel.org>, <hpa@zytor.com>,
	<arnd@arndb.de>
Subject: [PATCH v2 5/5] objtool: use arch_jump_destination in read_intra_function_calls
Date: Wed, 22 Jun 2022 18:13:44 +0800	[thread overview]
Message-ID: <20220622101344.38002-6-chenzhongjin@huawei.com> (raw)
In-Reply-To: <20220622101344.38002-1-chenzhongjin@huawei.com>

Now we use arch_jump_destination() instead of offset + len + immediate
for jump destination.
But in read_intra_function_calls it didn't get changed. Fix it.

Signed-off-by: Chen Zhongjin <chenzhongjin@huawei.com>
---
 tools/objtool/check.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 11ab13fd99fd..35d0a1bc4279 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -2127,7 +2127,7 @@ static int read_intra_function_calls(struct objtool_file *file)
 		 */
 		insn->type = INSN_JUMP_UNCONDITIONAL;
 
-		dest_off = insn->offset + insn->len + insn->immediate;
+		dest_off = arch_jump_destination(insn);
 		insn->jump_dest = find_insn(file, insn->sec, dest_off);
 		if (!insn->jump_dest) {
 			WARN_FUNC("can't find call dest at %s+0x%lx",
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2022-06-22 10:16 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-22 10:13 [PATCH v2 0/5] objtool: Reorganize x86 arch-specific code Chen Zhongjin
2022-06-22 10:13 ` Chen Zhongjin
2022-06-22 10:13 ` Chen Zhongjin
2022-06-22 10:13 ` [PATCH v2 1/5] objtool: Make ORC type code arch-specific Chen Zhongjin
2022-06-22 10:13   ` Chen Zhongjin
2022-06-22 10:13   ` Chen Zhongjin
2022-06-22 10:13 ` [PATCH v2 2/5] objtool: Make ORC init and lookup code arch-generic Chen Zhongjin
2022-06-22 10:13   ` Chen Zhongjin
2022-06-22 10:13   ` Chen Zhongjin
2022-06-22 10:13 ` [PATCH v2 3/5] objtool: Add generic symbol for relocation type Chen Zhongjin
2022-06-22 10:13   ` Chen Zhongjin
2022-06-22 10:13   ` Chen Zhongjin
2022-06-22 10:13 ` [PATCH v2 4/5] objtool: Specify host-arch for making LIBSUBCMD Chen Zhongjin
2022-06-22 10:13   ` Chen Zhongjin
2022-06-22 10:13   ` Chen Zhongjin
2022-06-22 10:13 ` Chen Zhongjin [this message]
2022-06-22 10:13   ` [PATCH v2 5/5] objtool: use arch_jump_destination in read_intra_function_calls Chen Zhongjin
2022-06-22 10:13   ` Chen Zhongjin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220622101344.38002-6-chenzhongjin@huawei.com \
    --to=chenzhongjin@huawei.com \
    --cc=arnd@arndb.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jpoimboe@kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.