Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:rewrite_section_headers

Proto:static int rewrite_section_headers(struct load_info *info, int flags)

Type:int

Parameter:

TypeParameterName
struct load_info *info
intflags
3015  sh_addr = 0
3017  When i < e_shnum cycle
3018  Elf_Shdr * shdr = sechdrs[i]
3019  If sh_type != SHT_NOBITS && len < sh_offset + sh_size Then
3021  pr_err("Module len %lu truncated\n", len)
3022  Return -ENOEXEC
3027  sh_addr = hdr + sh_offset
3031  If module_exit_section(secstrings + sh_name) Then sh_flags &= ~SHF_ALLOC
3037  sh_flags &= ~SHF_ALLOC
3038  sh_flags &= ~SHF_ALLOC
3040  Return 0
Caller
NameDescribe
load_moduleAllocate and load the module: note that size of section 0 is alwayszero, and we rely on this for optional sections.