From: Peter Zijlstra <peterz@infradead.org>
To: x86@kernel.org
Cc: linux-kernel@vger.kernel.org, peterz@infradead.org,
jpoimboe@redhat.com, brgerst@gmail.com, jiangshanlai@gmail.com,
Andrew.Cooper3@citrix.com, mark.rutland@arm.com
Subject: [PATCH 6/6] objtool: Fix STACK_FRAME_NON_STANDARD reloc type
Date: Fri, 06 May 2022 14:14:37 +0200 [thread overview]
Message-ID: <20220506121631.508692613@infradead.org> (raw)
In-Reply-To: 20220506121431.563656641@infradead.org
STACK_FRAME_NON_STANDARD results in inconsistent relocation types
depending on .c or .S usage:
Relocation section '.rela.discard.func_stack_frame_non_standard' at offset 0x3c01090 contains 5 entries:
Offset Info Type Symbol's Value Symbol's Name + Addend
0000000000000000 00020c2200000002 R_X86_64_PC32 0000000000047b40 do_suspend_lowlevel + 0
0000000000000008 0002461e00000001 R_X86_64_64 00000000000480a0 machine_real_restart + 0
0000000000000010 0000001400000001 R_X86_64_64 0000000000000000 .rodata + b3d4
0000000000000018 0002444600000002 R_X86_64_PC32 00000000000678a0 __efi64_thunk + 0
0000000000000020 0002659d00000001 R_X86_64_64 0000000000113160 __crash_kexec + 0
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
---
include/linux/objtool.h | 4 +++-
tools/include/linux/objtool.h | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
--- a/include/linux/objtool.h
+++ b/include/linux/objtool.h
@@ -2,6 +2,8 @@
#ifndef _LINUX_OBJTOOL_H
#define _LINUX_OBJTOOL_H
+#include <asm/asm.h>
+
#ifndef __ASSEMBLY__
#include <linux/types.h>
@@ -137,7 +139,7 @@ struct unwind_hint {
.macro STACK_FRAME_NON_STANDARD func:req
.pushsection .discard.func_stack_frame_non_standard, "aw"
- .long \func - .
+ _ASM_PTR \func
.popsection
.endm
--- a/tools/include/linux/objtool.h
+++ b/tools/include/linux/objtool.h
@@ -2,6 +2,8 @@
#ifndef _LINUX_OBJTOOL_H
#define _LINUX_OBJTOOL_H
+#include <asm/asm.h>
+
#ifndef __ASSEMBLY__
#include <linux/types.h>
@@ -137,7 +139,7 @@ struct unwind_hint {
.macro STACK_FRAME_NON_STANDARD func:req
.pushsection .discard.func_stack_frame_non_standard, "aw"
- .long \func - .
+ _ASM_PTR \func
.popsection
.endm
next prev parent reply other threads:[~2022-05-06 12:20 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-06 12:14 [PATCH 0/6] x86: Various cleanups and fixes Peter Zijlstra
2022-05-06 12:14 ` [PATCH 1/6] x86/mm: Simplify RESERVE_BRK() Peter Zijlstra
2022-05-06 15:09 ` [tip: x86/asm] " tip-bot2 for Josh Poimboeuf
2022-05-06 12:14 ` [PATCH 2/6] x86/entry: Simplify entry_INT80_compat() Peter Zijlstra
2022-05-06 15:09 ` [tip: x86/asm] " tip-bot2 for Linus Torvalds
2022-05-06 12:14 ` [PATCH 3/6] x86/entry: Use PUSH_AND_CLEAR_REGS for compat Peter Zijlstra
2022-05-06 15:09 ` [tip: x86/asm] " tip-bot2 for Peter Zijlstra
2022-05-07 2:54 ` [PATCH 3/6] " Lai Jiangshan
2022-05-19 16:24 ` Guenter Roeck
2022-05-19 17:00 ` Peter Zijlstra
2022-05-19 17:11 ` Josh Poimboeuf
2022-05-19 17:35 ` Josh Poimboeuf
2022-05-20 1:11 ` Lai Jiangshan
2022-05-20 2:46 ` Guenter Roeck
2022-05-20 15:55 ` Josh Poimboeuf
2022-05-06 12:14 ` [PATCH 4/6] x86/entry: Remove skip_r11rcx Peter Zijlstra
2022-05-06 15:09 ` [tip: x86/asm] " tip-bot2 for Peter Zijlstra
2022-05-07 2:52 ` [PATCH 4/6] " Lai Jiangshan
2022-05-06 12:14 ` [PATCH 5/6] linkage: Fix issue with missing symbol size Peter Zijlstra
2022-05-06 15:08 ` [tip: x86/asm] " tip-bot2 for Peter Zijlstra
2022-05-06 12:14 ` Peter Zijlstra [this message]
2022-05-06 15:08 ` [tip: x86/asm] objtool: Fix STACK_FRAME_NON_STANDARD reloc type tip-bot2 for Peter Zijlstra
2022-05-06 16:05 ` [PATCH 6/6] " Josh Poimboeuf
2022-05-06 20:26 ` [tip: x86/asm] " tip-bot2 for Peter Zijlstra
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=20220506121631.508692613@infradead.org \
--to=peterz@infradead.org \
--cc=Andrew.Cooper3@citrix.com \
--cc=brgerst@gmail.com \
--cc=jiangshanlai@gmail.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox