发明名称 Method for modifying the assembly output of a compiler
摘要 The present invention performs manipulations on the assembly file level. As a compiler outputs an assembly file, the assembly file may be inspected and modified before it is sent to the assembler. One or more of the following modifications may be made to the assembly file: rewrite certain symbols, scramble program symbols, reorganize declarations of global variables so that their layout and default values are known prior to linking, and identify initializer and de-initializer functions in order to make them callable through central initialization and de-initialization functions, respectively.
申请公布号 US8930928(B2) 申请公布日期 2015.01.06
申请号 US200912650743 申请日期 2009.12.31
申请人 Opera Software ASA 发明人 Rolland Morten
分类号 G06F9/45 主分类号 G06F9/45
代理机构 Birch, Stewart, Kolasch & Birch, LLP 代理人 Birch, Stewart, Kolasch & Birch, LLP
主权项 1. A method for avoiding naming conflicts while allowing a linked software library to be called on without reliance on a standard startup procedure for the application program to which the library is linked, comprising: utilizing a computer processor to obtain an assembly file generated by a compiler for the library; identify certain special symbols in the code of the assembly file which relate to memory management, and rewrite the identified symbols in the code to allow the use of the library's memory management functions without interfering with standard memory management functions available on an underlying operating system and system libraries; modifying the code in the assembly file to avoid a name collision, which would otherwise occur when a function, variable, or object class in the library has a same name as another function, variable, or object class in a different library or application loaded when linked in an operating system, by performing at least one of the following: rewrite one or more symbols in the code related to the name of a function, variable, or object class, andscramble one or more symbols in the code related to the name of a function, variable, or object class; and removing the declaration of one or more global variables from the modified assembly file, the removed declaration being inserted into a global assembly file.
地址 Oslo NO