Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Expand a compressed symbol data into the resulting uncompressed string,* if uncompressed string is too long (>= maxlen), it will be truncated,* given the offset to where the symbol is in the compressed stream.

Proto:static unsigned int kallsyms_expand_symbol(unsigned int off, char *result, size_t maxlen)

Type:unsigned int

Parameter:

TypeParameterName
unsigned intoff
char *result
size_tmaxlen
60  skipped_first = 0
64  data = kallsyms_names[off]
65  len = data
66  data++
72  off += len + 1
78  When len cycle
79  tptr = kallsyms_token_table[kallsyms_token_index[ * data]]
80  data++
81  len--
83  When tptr cycle
84  If skipped_first Then
85  If maxlen <= 1 Then Go to tail
87  result = tptr
88  result++
89  maxlen--
90  Else skipped_first = 1
92  tptr++
96  tail :
97  If maxlen Then result = '\0'
101  Return off
Caller
NameDescribe
kallsyms_lookup_nameLookup the address for this symbol. Returns 0 if not found.
kallsyms_on_each_symbol
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
get_ksymbol_coreReturns space to next name.