Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:module_finalize

Proto:int module_finalize(const Elf32_Ehdr *hdr, const Elf32_Shdr *sechdrs, struct module *me)

Type:int

Parameter:

TypeParameterName
const Elf32_Ehdr *hdr
const Elf32_Shdr *sechdrs
struct module *me
224  const Elf_Shdr * s, * text = NULL, * alt = NULL, * locks = NULL, * para = NULL, * orc = NULL, * orc_ip = NULL
226  secstrings = hdr + sh_offset
228  When s < sechdrs + e_shnum cycle
229  If Not strcmp(".text", secstrings + sh_name) Then text = s
231  If Not strcmp(".altinstructions", secstrings + sh_name) Then alt = s
233  If Not strcmp(".smp_locks", secstrings + sh_name) Then locks = s
235  If Not strcmp(".parainstructions", secstrings + sh_name) Then para = s
237  If Not strcmp(".orc_unwind", secstrings + sh_name) Then orc = s
239  If Not strcmp(".orc_unwind_ip", secstrings + sh_name) Then orc_ip = s
243  If alt Then
245  aseg = sh_addr
246  Replace instructions with better alternatives for this CPU type. This runs* before SMP is initialized to avoid SMP problems with self modifying code.* This implies that asymmetric systems where APs have less capabilities than
248  If locks && text Then
249  lseg = sh_addr
250  tseg = sh_addr
251  alternatives_smp_module_add(me, Unique handle for this module , lseg, lseg + sh_size, tseg, tseg + sh_size)
256  If para Then
257  pseg = sh_addr
258  apply_paravirt(pseg, pseg + sh_size)
262  jump_label_apply_nops(me)
264  If orc && orc_ip Then unwind_module_init(me, (void * )sh_addr, sh_size, (void * )sh_addr, sh_size)
268  Return 0