发明名称 Linking a function with dual entry points
摘要 A method for a static linker to resolve a function call can include identifying, during link time, a first function call of a calling function to a callee function, determining whether the callee function is a local function, determining whether the callee function has a plurality of entry points, and whether an entry point of the plurality of entry points is a local entry point. The method can include resolving, during link time, the first function call to enter the local entry point, which can include replacing a symbol for the function in the first function call with an address of the local entry point during link time. If the callee function cannot be determined to be a local function, the method can include generating stub code and directing the first function call to enter the stub code during link time.
申请公布号 US9348616(B2) 申请公布日期 2016.05.24
申请号 US201414570010 申请日期 2014.12.15
申请人 International Business Machines Corporation 发明人 Gschwind Michael Karl;Weigand Ulrich
分类号 G06F9/54;G06F9/445;G06F9/44 主分类号 G06F9/54
代理机构 代理人 Wilhelm Richard A.;Bennett Steven L.
主权项 1. A computer-implemented method for a static linker to resolve a function call, comprising: identifying, during link time, a first function call of a calling function to a callee function; determining whether the callee function is a local function; in response to determining that the callee function is a local function, determining whether the callee function has a plurality of entry points and whether an entry point of the plurality of entry points is a local entry point, wherein the determining of whether the callee function has a plurality of entry points and whether an entry point of the plurality of entry points is a local entry point includes accessing symbol information from a symbol table, the symbol table indicating a number of entry points and whether an entry point is a local entry point; and resolving, during link time, the first function call to enter the local entry point when it is determined that the callee function has a plurality of entry points and an entry point of the plurality of entry points is the local entry point, wherein the resolving of the first function call to enter the local entry point includes replacing a symbol for the callee function in the first function call with an address of the local entry point during link time.
地址 Armonk NY US