函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\binfmt_flat.c Create Date:2022-07-29 11:04:19
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:calc_reloc

函数原型:static unsigned long calc_reloc(unsigned long r, struct lib_info *p, int curid, int internalp)

返回类型:unsigned long

参数:

类型参数名称
unsigned longr
struct lib_info *p
intcurid
intinternalp
352  id等于0
355  start_brk等于 End of data segment
356  start_data等于 Start of data segment
357  start_code等于 Start of text segment
358  text_len等于 Length of text segment
360  如果r大于start_brkstart_datatext_len
361  打印错误信息("reloc outside program 0x%lx (0 - 0x%lx/0x%lx)", r, start_brk - start_data + text_len, text_len)
363  转到:failed
366  如果r小于text_lenaddr等于rstart_code
368  否则addr等于rtext_lenstart_data
372  返回:addr
374  failed :
375  打印标准信息(", killing %s!\n", comm)
376  send_sig(SIGSEGV, 当前进程, 0)
378  返回:Relocation incorrect somewhere
调用者
名称描述
load_flat_file