📄 fixup.c
字号:
/* *---------------------------------------------------------------------- * T-Kernel / Standard Extension * * Copyright (C) 2006 by Ken Sakamura. All rights reserved. * T-Kernel / Standard Extension is distributed * under the T-License for T-Kernel / Standard Extension. *---------------------------------------------------------------------- * * Version: 1.00.00 * Released by T-Engine Forum(http://www.t-engine.org) at 2006/8/11. * *---------------------------------------------------------------------- *//* * @(#)fixup.c (solib) * * Shared object(SO)support library * Search/link of symbol */#include "../../so.h"/* * Run time symbol link */EXPORT UW __so_fixup( DLInfo *dlp, UW relofs){ Elf32_Rela *rela; Elf32_Sym *sym; UB *name; UW val; UW *uwp; rela = (VP)((UW)dlp->jreltab + relofs); sym = &dlp->symtab[ELF32_R_SYM(rela->r_info)]; /* Symbol search(link) */ name = dlp->strtab + sym->st_name; val = __so_resolve(dlp, name, R_SH_JMP_SLOT, &sym); if ( sym == NULL ) { SYSLOG((LOG_ERR, "solib: %s is not defined", name)); } /* Store the symbol value */ uwp = (UW*)((UB *)(rela->r_offset) + dlp->ldofs); *uwp = val; return val;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -