mirror of
https://github.com/torvalds/linux.git
synced 2026-03-13 23:46:14 +01:00
This reimplements commit 951bcae6c5 ("kallsyms: Avoid weak references
for kallsyms symbols") because I am not a big fan of PROVIDE().
As an alternative solution, this commit prepends one more kallsyms step.
KSYMS .tmp_vmlinux.kallsyms0.S # added
AS .tmp_vmlinux.kallsyms0.o # added
LD .tmp_vmlinux.btf
BTF .btf.vmlinux.bin.o
LD .tmp_vmlinux.kallsyms1
NM .tmp_vmlinux.kallsyms1.syms
KSYMS .tmp_vmlinux.kallsyms1.S
AS .tmp_vmlinux.kallsyms1.o
LD .tmp_vmlinux.kallsyms2
NM .tmp_vmlinux.kallsyms2.syms
KSYMS .tmp_vmlinux.kallsyms2.S
AS .tmp_vmlinux.kallsyms2.o
LD vmlinux
Step 0 takes /dev/null as input, and generates .tmp_vmlinux.kallsyms0.o,
which has a valid kallsyms format with the empty symbol list, and can be
linked to vmlinux. Since it is really small, the added compile-time cost
is negligible.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
20 lines
569 B
C
20 lines
569 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
#ifndef LINUX_KALLSYMS_INTERNAL_H_
|
|
#define LINUX_KALLSYMS_INTERNAL_H_
|
|
|
|
#include <linux/types.h>
|
|
|
|
extern const unsigned long kallsyms_addresses[];
|
|
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[];
|
|
|
|
extern const unsigned int kallsyms_markers[];
|
|
extern const u8 kallsyms_seqs_of_names[];
|
|
|
|
#endif // LINUX_KALLSYMS_INTERNAL_H_
|