mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 00:48:50 +00:00
19bd8981dc
kallsyms_seqs_of_names[] records the symbol index sorted by address, the maximum value in kallsyms_seqs_of_names[] is the number of symbols. And 2^24 = 16777216, which means that three bytes are enough to store the index. This can help us save (1 * kallsyms_num_syms) bytes of memory. Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
31 lines
907 B
C
31 lines
907 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
#ifndef LINUX_KALLSYMS_INTERNAL_H_
|
|
#define LINUX_KALLSYMS_INTERNAL_H_
|
|
|
|
#include <linux/types.h>
|
|
|
|
/*
|
|
* These will be re-linked against their real values
|
|
* during the second link stage.
|
|
*/
|
|
extern const unsigned long kallsyms_addresses[] __weak;
|
|
extern const int kallsyms_offsets[] __weak;
|
|
extern const u8 kallsyms_names[] __weak;
|
|
|
|
/*
|
|
* Tell the compiler that the count isn't in the small data section if the arch
|
|
* has one (eg: FRV).
|
|
*/
|
|
extern const unsigned int kallsyms_num_syms
|
|
__section(".rodata") __attribute__((weak));
|
|
|
|
extern const unsigned long kallsyms_relative_base
|
|
__section(".rodata") __attribute__((weak));
|
|
|
|
extern const char kallsyms_token_table[] __weak;
|
|
extern const u16 kallsyms_token_index[] __weak;
|
|
|
|
extern const unsigned int kallsyms_markers[] __weak;
|
|
extern const u8 kallsyms_seqs_of_names[] __weak;
|
|
|
|
#endif // LINUX_KALLSYMS_INTERNAL_H_
|