Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:apply_relocations

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

Type:int

Parameter:

TypeParameterName
struct module *mod
const struct load_info *info
2366  err = 0
2369  When i < e_shnum cycle
2370  infosec = sh_info
2373  If infosec >= e_shnum Then Continue
2377  If Not (sh_flags & SHF_ALLOC) Then Continue
2381  If sh_flags & SHF_RELA_LIVEPATCH Then Continue
2384  If sh_type == SHT_REL Then err = apply_relocate(sechdrs, strtab, sym, i, mod)
2387  Else if sh_type == SHT_RELA Then err = apply_relocate_add(sechdrs, strtab, sym, i, mod)
2390  If err < 0 Then Break
2393  Return err
Caller
NameDescribe
load_moduleAllocate and load the module: note that size of section 0 is alwayszero, and we rely on this for optional sections.