Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:move_module

Proto:static int move_module(struct module *mod, struct load_info *info)

Type:int

Parameter:

TypeParameterName
struct module *mod
struct load_info *info
3258  ptr = module_alloc( Total size. )
3264  kmemleak_not_leak(ptr)
3265  If Not ptr Then Return -ENOMEM
3268  memset(ptr, 0, Total size. )
3269  The actual code + data. = ptr
3271  If Total size. Then
3272  ptr = module_alloc( Total size. )
3279  kmemleak_ignore(ptr)
3280  If Not ptr Then
3282  Return -ENOMEM
3284  memset(ptr, 0, Total size. )
3285  The actual code + data. = ptr
3286  Else The actual code + data. = NULL
3290  pr_debug("final section addresses:\n")
3291  When i < e_shnum cycle
3293  Elf_Shdr * shdr = sechdrs[i]
3295  If Not (sh_flags & SHF_ALLOC) Then Continue
3298  If sh_entsize & If this is set, the section belongs in the init part of the module Then dest = The actual code + data. + (sh_entsize & ~If this is set, the section belongs in the init part of the module )
3301  Else dest = The actual code + data. + sh_entsize
3304  If sh_type != SHT_NOBITS Then No 3D Now!(dest, (void * )sh_addr, sh_size)
3307  sh_addr = dest
3308  pr_debug("\t0x%lx %s\n", (long)sh_addr, secstrings + sh_name)
3312  Return 0
Caller
NameDescribe
layout_and_allocate