summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorNathan Chancellor <nathan@kernel.org>2026-02-12 11:28:27 -0500
committerNathan Chancellor <nathan@kernel.org>2026-02-12 11:28:27 -0500
commitdf989b01b5f97dae8f9869cfacbda1308f2182c1 (patch)
treed150f91b9c27af17590ee54f5b2f778529e916d5 /kernel
parent05f7e89ab9731565d8a62e3b5d1ec206485eeb0b (diff)
parentd8ad80a85b96649a6ef30976762660245ae61a25 (diff)
Merge 7.0 Kbuild changes into kbuild-fixes
kbuild-fixes needs to be based on 6.19 to apply some fixes for 62089b804895 ("kbuild: rpm-pkg: Generate debuginfo package manually") which landed in 6.19-rc1 but the new material of 7.0 needs fixes merged as well. Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/kallsyms.c6
-rw-r--r--kernel/kallsyms_internal.h1
-rw-r--r--kernel/vmcore_info.c1
3 files changed, 4 insertions, 4 deletions
diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
index 049e296f586c..6125724aadb1 100644
--- a/kernel/kallsyms.c
+++ b/kernel/kallsyms.c
@@ -151,8 +151,10 @@ static unsigned int get_symbol_offset(unsigned long pos)
unsigned long kallsyms_sym_address(int idx)
{
- /* values are unsigned offsets */
- return kallsyms_relative_base + (u32)kallsyms_offsets[idx];
+ /* non-relocatable 32-bit kernels just embed the value directly */
+ if (!IS_ENABLED(CONFIG_64BIT) && !IS_ENABLED(CONFIG_RELOCATABLE))
+ return (u32)kallsyms_offsets[idx];
+ return (unsigned long)offset_to_ptr(kallsyms_offsets + idx);
}
static unsigned int get_symbol_seq(int index)
diff --git a/kernel/kallsyms_internal.h b/kernel/kallsyms_internal.h
index 9633782f8250..81a867dbe57d 100644
--- a/kernel/kallsyms_internal.h
+++ b/kernel/kallsyms_internal.h
@@ -8,7 +8,6 @@ extern const int kallsyms_offsets[];
extern const u8 kallsyms_names[];
extern const unsigned int kallsyms_num_syms;
-extern const unsigned long kallsyms_relative_base;
extern const char kallsyms_token_table[];
extern const u16 kallsyms_token_index[];
diff --git a/kernel/vmcore_info.c b/kernel/vmcore_info.c
index e2784038bbed..46fc1050f1bb 100644
--- a/kernel/vmcore_info.c
+++ b/kernel/vmcore_info.c
@@ -242,7 +242,6 @@ static int __init crash_save_vmcoreinfo_init(void)
VMCOREINFO_SYMBOL(kallsyms_token_table);
VMCOREINFO_SYMBOL(kallsyms_token_index);
VMCOREINFO_SYMBOL(kallsyms_offsets);
- VMCOREINFO_SYMBOL(kallsyms_relative_base);
#endif /* CONFIG_KALLSYMS */
arch_crash_save_vmcoreinfo();