Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\binfmt_flat.c Create Date:2022-07-28 20:29:23
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:calc_reloc

Proto:static unsigned long calc_reloc(unsigned long r, struct lib_info *p, int curid, int internalp)

Type:unsigned long

Parameter:

TypeParameterName
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  If r > start_brk - start_data + text_len Then
361  pr_err("reloc outside program 0x%lx (0 - 0x%lx/0x%lx)", r, start_brk - start_data + text_len, text_len)
363  Go to failed
366  If r < text_len Then addr = r + start_code
368  Else addr = r - text_len + start_data
372  Return addr
374  failed :
375  Like KERN_CONT, pr_cont() should only be used when continuing* a line with no newline ('\n') enclosed. Otherwise it defaults* back to KERN_DEFAULT.(", killing %s!\n", comm)
376  send_sig(SIGSEGV, current process, 0)
378  Return Relocation incorrect somewhere
Caller
NameDescribe
load_flat_file