函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\kallsyms.c Create Date:2022-07-27 12:00:52
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:get_symbol_pos

函数原型:static unsigned long get_symbol_pos(unsigned long addr, unsigned long *symbolsize, unsigned long *offset)

返回类型:unsigned long

参数:

类型参数名称
unsigned longaddr
unsigned long *symbolsize
unsigned long *offset
202  symbol_start等于0, symbol_end等于0
206  如果非IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_KALLSYMS_BASE_RELATIVE)则BUG_ON(!These will be re-linked against their real values* during the second link stage.)
208  否则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 highlow大于1循环
216  mid等于lowhighlow的差除2
217  如果kallsyms_sym_address(mid)小于等于addrlow等于mid
219  否则high等于mid
227 lowkallsyms_sym_address(low - 1)恒等于kallsyms_sym_address(low)循环
228  low先自减
230  symbol_start等于kallsyms_sym_address(low)
233 i小于Tell the compiler that the count isn't in the small data section if the arch* has one (eg: FRV).循环
234  如果kallsyms_sym_address(i)大于symbol_start
236  退出
241  如果非symbol_end
242  如果is_kernel_inittext(addr)则symbol_end等于_einittext
244  否则如果IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_KALLSYMS_ALL)则symbol_end等于_end
246  否则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  如果symbolsizesymbolsize等于symbol_endsymbol_start
252  如果offsetoffset等于addrsymbol_start
255  返回:low
调用者
名称描述
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