Check patentability & draft patents in minutes with Patsnap Eureka AI!

Hidden method, device and equipment for derived symbols of dynamic library and storage medium

A technology for exporting symbols and dynamic libraries, applied in the field of dynamic libraries, can solve the problems of cumbersome steps and inconvenient implementation of the hidden method of exporting symbols, and achieve the effect of convenient implementation and simple steps.

Active Publication Date: 2022-07-12
深圳软牛科技有限公司
View PDF11 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The main purpose of the present invention is to solve the technical problem that the hidden method steps of the existing dynamic library derived symbols are cumbersome and inconvenient to realize

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Hidden method, device and equipment for derived symbols of dynamic library and storage medium
  • Hidden method, device and equipment for derived symbols of dynamic library and storage medium
  • Hidden method, device and equipment for derived symbols of dynamic library and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0046] There are two exported C functions, as follows:

[0047] EXPORT int encryptText(const char*text,char*output);

[0048] EXPORT int decryptCipher(const char*cipher,char*output);

[0049] The usual practice is to mark each exported function with EXPORT, which corresponds to different descriptors in different compilers. After adding EXPORT, the function appears in the export symbol table, which is an interface exposed to the outside world. Microsoft's msvc compiler EXPORT corresponds to __declspec(dllexport)

[0050] After the dynamic library is generated, use dumpobj.exe / EXPORT in the msvc toolkit to view the exported symbols:

[0051] 000010C3? decryptCipher@@YAHPEBDPEAD@Z=@ILT+190(?decryptCipher@@YAHPEBDPEAD@Z)

[0052] 00001127? encryptText@@YAHPEBDPEAD@Z=@ILT+290(?encryptText@@YAHPEBDPEAD@Z)

[0053] ? decryptCipher@@YAHPEBDPEAD@Z, ? encryptText@@YAHPEBDPEAD@Z is the export symbol, use the UnDecorateSymbolName function of sdk to parse it once, and get the func...

Embodiment 2

[0074] Example 2: For higher modularity, an export class scheme is provided. The export class actually exports every function of the class. The usual practice is:

[0075]

[0076] This application plan:

[0077] 1. Only define one ExportEntry

[0078]

[0079] 2. Define a class ExportEntry that inherits IExportEntry and implement virtual methods

[0080] 3. Define a method to get this IExportEntry and mark it as an export function

[0081] IExportEntry*EXPORT getExportEntry();

Embodiment 3

[0083] Multiple exported interface classes:

[0084]

[0085] Solution of the present application: Under this embodiment, the advantage is that there is no manual mapping of strings to classes, and there is no mandatory type conversion to the created type when using;

[0086] 1. Define the class:

[0087]

[0088] 2. Define a unique export symbol

[0089]

[0090] see figure 2 , the second aspect of the present invention provides a hidden device for exporting symbols in a dynamic library, and the hiding device for exporting symbols in a dynamic library includes:

[0091] The first building module 10 is used to build a C++ class containing a virtual function;

[0092] The entry definition module 20 is used to use the virtual function table of the C++ class as the entry of the dynamic library export symbol;

[0093] The calling definition module 30 is used to place each function or function code to be exported into each function imaginary number of the C++ class fo...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a hiding method and device for a dynamic library derived symbol, equipment and a storage medium. The method comprises the following steps: constructing a C + + class containing a virtual function; taking the C + + type virtual function table as an entry of a dynamic library export symbol; each function or function code to be exported is put into each function imaginary number of the C + + class to be called; and constructing an export function, and creating and returning a pointer of the C + + class object in the export function. According to the method disclosed by the invention, the externally exported symbols are put into the virtual function table, and the calling of the virtual function is carried out according to the offset of the virtual function index. According to the method, a group of called virtual functions are defined through an abstract class and are used for exporting a function to be exported, a real exporting function only needs to provide a function for returning a pointer address of an abstract class interface, the characteristics of the virtual functions are fully utilized, the steps are simple, and implementation is more convenient.

Description

technical field [0001] The present invention relates to the technical field of dynamic libraries, and in particular, to a method, device, device and storage medium for hiding derived symbols from a dynamic library. Background technique [0002] In the field of software development, software is becoming more and more complex, and it needs to be packaged into different modules according to functions. The most common ones are static libraries and dynamic libraries. Exporting symbols is the bridge between modules and the outside world. After the product is released, competitors can gain an understanding of the function of the module by exporting the symbol table. If the exported symbols are well-known, they can even directly call the dynamic library and use the functions of the library. In particular, the export symbols of C++ include the complete signature information of the function. [0003] For core modules, some hidden scheme protection measures are usually added to the ex...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/445
CPCG06F9/44521Y02D10/00
Inventor 王功华江泽龙李盛
Owner 深圳软牛科技有限公司
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More