Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\kallsyms.c Create Date:2022-07-28 11:00:11
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:get_symbol_pos

Proto:static unsigned long get_symbol_pos(unsigned long addr, unsigned long *symbolsize, unsigned long *offset)

Type:unsigned long

Parameter:

TypeParameterName
unsigned longaddr
unsigned long *symbolsize
unsigned long *offset
202  symbol_start = 0 , symbol_end = 0
206  If Not IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_KALLSYMS_BASE_RELATIVE) Then BUG_ON(!These will be re-linked against their real values* during the second link stage.)
208  Else BUG_ON(!kallsyms_offsets)
212  low = 0
213  high = Tell the compiler that the count isn't in the small data section if the arch* has one (eg: FRV).
215  When high - low > 1 cycle
216  mid = low + (high - low) / 2
217  If kallsyms_sym_address(mid) <= addr Then low = mid
219  Else high = mid
227  When low && kallsyms_sym_address(low - 1) == kallsyms_sym_address(low) cycle
228  --low
230  symbol_start = kallsyms_sym_address(low)
233  When i < Tell the compiler that the count isn't in the small data section if the arch* has one (eg: FRV). cycle
236  Break
241  If Not symbol_end Then
242  If is_kernel_inittext(addr) Then symbol_end = _einittext
244  Else if IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_KALLSYMS_ALL) Then symbol_end = _end
246  Else symbol_end = Usage guidelines:* _text, _data: architecture specific, don't use them in arch-independent code* [_stext, _etext]: contains .text.* sections, may also contain .rodata.** and/or .init.* sections* [_sdata, _edata]: contains
250  If symbolsize Then symbolsize = symbol_end - symbol_start
252  If offset Then offset = addr - symbol_start
255  Return low
Caller
NameDescribe
kallsyms_lookup_size_offsetLookup an address but don't bother to find any names.
kallsyms_lookupLookup an address* - modname is set to NULL if it's in the kernel.* - We guarantee that the returned name is valid until we reschedule even if.* It resides in a module.* - We also guarantee that modname will be valid until rescheduled.
lookup_symbol_name
lookup_symbol_attrs