CN113849245B - Application program running method, computing device and storage medium - Google Patents

Application program running method, computing device and storage medium Download PDF

Info

Publication number
CN113849245B
CN113849245B CN202111115289.8A CN202111115289A CN113849245B CN 113849245 B CN113849245 B CN 113849245B CN 202111115289 A CN202111115289 A CN 202111115289A CN 113849245 B CN113849245 B CN 113849245B
Authority
CN
China
Prior art keywords
information
file
section
module
application program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111115289.8A
Other languages
Chinese (zh)
Other versions
CN113849245A (en
Inventor
钟俊
江峰
柏鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Deepin Technology Co ltd
Original Assignee
Wuhan Deepin Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Deepin Technology Co ltd filed Critical Wuhan Deepin Technology Co ltd
Priority to CN202111115289.8A priority Critical patent/CN113849245B/en
Publication of CN113849245A publication Critical patent/CN113849245A/en
Application granted granted Critical
Publication of CN113849245B publication Critical patent/CN113849245B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44557Code layout in executable memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/447Target code generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Abstract

The invention discloses an application program running method, a computing device and a storage medium, and the method comprises the following steps: generating an executable file of the application program according to the application file; determining first storage information stored in an internal memory by the application program according to an executable file of the application program, wherein the first storage information comprises first section information of an uninitialized data section in the internal memory; generating second section information of the uninitialized data section according to the first section information and the module file; generating second storage information according to the second section information and the first storage information; loading the executable file and the module file of the application program into an internal memory according to the second storage information; and running the application program according to the executable file and the module file in the internal memory, and constructing the functional module in the application program. The invention can load the module file into the internal memory, and construct the functional module based on the executable file of the application program so as to realize the additional function of the application program.

Description

Application program running method, computing device and storage medium
Technical Field
The present invention relates to the field of operating systems, and in particular, to an application program running method, a computing device, and a storage medium.
Background
With the continued development of computer technology, more and more applications are being developed. Accordingly, more and more data are applied, and the data structure is more and more complex. In the process of using an application program, it is sometimes necessary to implement additional functions on the basis of the application program, or to know the running condition of the application, etc.
In the prior art, when an application program is loaded, a binary file is obtained through a series of operations such as compiling, and the binary file cannot be processed. Therefore, additional functions to be implemented in an application must be compiled again after the required functions are added to the source code of the application, which has not yet been compiled. This approach is not only complex but is not suitable for special scenarios, such as when there is no source code file or no source code modification is possible, the addition of additional functionality in the application cannot be achieved.
For this reason, a new application running method is required.
Disclosure of Invention
To this end, the present invention provides an application running method in an effort to solve or at least alleviate the above-presented problems.
According to one aspect of the present invention, there is provided an application program running method adapted to be executed in a computing device including an internal memory and an external memory, the external memory storing an application file and a module file, the method comprising the steps of: generating an executable file of the application program according to the application file; determining first storage information stored in an internal memory by the application program according to an executable file of the application program, wherein the first storage information comprises first section information of an uninitialized data section distributed in the internal memory; generating second section information of the uninitialized data section according to the first section information and the module file; generating second storage information according to the second section information and the first storage information; loading the executable file and the module file of the application program into an internal memory according to the second storage information; and running the application program according to the executable file and the module file in the internal memory, and constructing a functional module in the application program to realize the additional function of the application program.
Optionally, in the method according to the present invention, determining the first stored information stored in the internal memory of the application program according to the executable file of the application program comprises the steps of: determining a first section size and first alignment information of an uninitialized data section allocated in an internal memory according to an executable file; generating first section information of the uninitialized data section according to the first section size and the first alignment information; first storage information is generated from the first section information.
Optionally, in the method according to the present invention, generating the second section information from the first section information and the module file includes the steps of: generating a second section size according to the first section size and the module file; generating second alignment information according to the first alignment information and the module file; second section information of the uninitialized data section is generated according to the second section size and the second alignment information.
Optionally, in the method according to the present invention, generating the second section size from the first section size and the module file comprises the steps of: and adding the first section size and the file size of the module file to obtain a second section size.
Optionally, in the method according to the present invention, the first alignment information includes an application alignment mode, and generating the second alignment information according to the first alignment information and the module file includes the steps of: generating a module alignment mode according to the application alignment mode; and generating second alignment information according to the application alignment mode and the module alignment mode to ensure that the module alignment mode of the module file in the internal memory is the same as the application alignment mode of the executable file in the internal memory.
Optionally, in the method according to the present invention, loading the executable file and the module file of the application program into the internal memory according to the second storage information includes the steps of: loading the executable file into the internal memory according to the second storage information; and loading the module file into the uninitialized data section according to the second section information of the uninitialized data section in the second storage information.
Optionally, in the method according to the invention, loading the executable file into the internal memory according to the second storage information comprises the steps of: allocating uninitialized data segments in the internal memory according to the second segment size; uninitialized data for the executable file is stored in the uninitialized data segment.
Optionally, in the method according to the present invention, loading the module file into the uninitialized data section according to the second section information of the uninitialized data section in the second storage information includes the steps of: determining a module alignment mode according to a second alignment mode of the second section information; and storing the module file in the uninitialized data section according to the module alignment mode.
Optionally, in the method according to the invention, the method further comprises the step of: calculating the initial position of the module file stored in the uninitialized data section; the construction of the functional module in the application program comprises the following steps: and according to the starting position, the module file is called from the internal memory, and the functional module is constructed.
According to another aspect of the present invention, there is provided a computing device comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for performing an application program execution method according to the present invention.
According to yet another aspect of the present invention, there is provided a computer readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by a computing device, cause the computing device to perform a method of an application program execution method according to the present invention.
The application program running method is suitable for being executed in a computing device, and the computing device comprises an external memory and an internal memory, wherein the external memory stores application files and module files. Firstly, generating an executable file of an application program according to an application file, and when the application program is loaded, processing the application file in an external memory to obtain the executable file of a binary type file, wherein the executable file can be stored in an internal memory. The first storage information stored in the internal memory by the application program is then determined from the executable file of the application program, the first storage information including first section information of the allocated uninitialized data sections in the internal memory. When loading an executable file of an application program in an internal memory, dividing a plurality of sections in the internal memory, and loading corresponding data of the executable file in each section; in order to load the module file into the uninitialized data section, the second section information of the uninitialized data section needs to be regenerated according to the first section information of the uninitialized data section and the module file. And generating second storage information according to the second section information and the first storage information so as to load the executable file and the module file of the application program into the internal memory according to the second storage information. After the executable file and the module file of the application program are loaded into the internal memory together, the functional module can be built in the application program to realize the additional functions of the application program.
Drawings
To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings, which set forth the various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof are intended to fall within the scope of the claimed subject matter. The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description when read in conjunction with the accompanying drawings. Like reference numerals generally refer to like parts or elements throughout the present disclosure.
FIG. 1 illustrates a schematic diagram of the structure of an external memory and an internal memory according to an exemplary embodiment of the present invention;
FIG. 2 illustrates a block diagram of a computing device 200 according to an exemplary embodiment of the invention;
FIG. 3 illustrates a flow diagram of an application running method 300 according to an exemplary embodiment of the invention;
FIG. 4 illustrates a schematic diagram of inserting a module file into an uninitialized data segment, according to an exemplary embodiment of the present invention;
fig. 5 illustrates a flowchart of generating second section information of an uninitialized data section according to an exemplary embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art. Like reference numerals generally refer to like parts or elements.
Fig. 1 illustrates a schematic structure of an external memory and an internal memory according to an exemplary embodiment of the present invention. As shown in FIG. 1, computing device 200 includes internal memory 230 and external memory 210, and is running an operating system 220. The invention is not limited in the nature of the operating system 220. The external memory 210 stores therein an application file 211 and a module file 212. The manner in which the external memory 210 stores the application files 211 and the module files 212 shown in fig. 1 is merely exemplary, and the present invention does not limit the number of application files and module files stored in the external memory 210.
The application file 211 may be implemented as an application file of any kind of application program, and the kind of application program and the type of application file are not limited in the present invention. According to one embodiment of the invention, the application file 211 is adapted to be compiled, assembled, linked, etc. by the operating system 220 to obtain an executable file of the application program, which is finally loaded into the internal memory 230.
The module file 212 may be implemented as a module file of any kind of function module, and the function module may implement additional functions of an application program, and the present invention is not limited to the file type of the module file 212 and the kind of the additional functions of the implemented application program. The module file 212 may be an uncompiled file that is processed in advance when loaded into the internal memory 230, resulting in an executable file of the functional module that may be loaded into the internal memory 230. The module file 212 may also be implemented as a binary type file that is convenient to load directly into the corresponding location in the internal memory 230.
The module file 212 is previously constructed by a developer, and in order to implement additional functions in the application program, the module file 212 needs to be loaded into the internal memory 230, and in particular, needs to be stored in the internal memory 230 at a corresponding location where an executable file of the application program is stored. After the module file 212 is deployed to the corresponding position, the module file 212 is transparent to the application program, the application program does not sense and use the module file 212, and the operating system 220 directly calls the module file 212 to construct a function module, so that the additional function of the application program is realized.
According to one embodiment of the present invention, the functional module may be implemented as a locking module, where during the running process of the application program, the executing code generates an abnormal access to the boundary, and when a thread processes the abnormal access to the boundary, the locking module may implement an additional function of locking the thread, so as to protect the abnormal processing process from being interrupted, so as to ensure that the operating system 220 can normally process the abnormality, and enable the program to run smoothly.
When storing an executable file of an application, the internal memory 230 allocates memory space for the executable file. The memory space allocated by the internal memory 230 includes a plurality of different memory segments, and the executable files are stored in the internal memory 230 in the form of the memory segments. The internal memory 230 divides the storage space into memory sections including a heap section, a stack section, an initialized data section, and an uninitialized data section. The memory segment is divided in the internal memory 230 according to the first memory information by determining the first memory information according to the file information of the application executable file when the operating system creates the process.
The uninitialized data segment is suitable for storing an uninitialized global variable in an application program, and is static memory allocation. The step of storing the module file in the uninitialized data section is simple. For the module files which do not need special operation, the module files can be directly arranged in the uninitialized data section, so that the deployment efficiency of the functional modules and the module files is improved, and the deployment flow is simplified.
The specific structure of computing device 200 in fig. 1 is shown in fig. 2. FIG. 2 illustrates a block diagram of a computing device 200 according to an exemplary embodiment of the invention. As shown in FIG. 2, in a basic configuration 202, computing device 200 typically includes a system memory 206 and one or more processors 204. A memory bus 208 may be used for communication between the processor 204 and the system memory 206.
Depending on the desired configuration, the processor 204 may be any type of processing including, but not limited to: microprocessor (μp), microcontroller (μc), digital information processor (DSP), or any combination thereof. Processor 204 may include one or more levels of cache, such as a level one cache 271 and a level two cache 272, a processor core 214, and registers 216. The example processor core 214 may include an Arithmetic Logic Unit (ALU), a Floating Point Unit (FPU), a digital signal processing core (DSP core), or any combination thereof. The example memory controller 218 may be used with the processor 204, or in some implementations, the memory controller 218 may be an internal part of the processor 204.
Depending on the desired configuration, system memory 206 may be any type of memory including, but not limited to: volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof. The system memory 206 may include an operating system 220, one or more programs 222, and program data 228. In some implementations, the program 222 may be arranged to execute instructions 223 of the method 300 according to the present invention on an operating system by the one or more processors 204 using the program data 228.
Computing device 200 may also include a storage interface bus 234. Storage interface bus 234 enables communication from storage devices 232 (e.g., removable storage 236 and non-removable storage 238) to base configuration 202 via bus/interface controller 273. At least a portion of operating system 220, programs 222, and data 224 may be stored on removable storage 236 and/or non-removable storage 238, and when the program 222 is powered up or is to be executed by the computing device 200, loaded into the system memory 206 via storage interface bus 234 and executed by the one or more processors 204.
Computing device 200 may also include an interface bus 240 that facilitates communication from various interface devices (e.g., output devices 242, peripheral interfaces 244, and communication devices 246) to basic configuration 202 via a bus/interface controller 273. The example output device 242 includes a graphics processing unit 248 and an audio processing unit 250. They may be configured to facilitate communication with various external devices, such as a display or speakers, via one or more a/V ports 252. Example peripheral interfaces 244 may include a serial interface controller 254 and a parallel interface controller 256, which may be configured to facilitate communications with external devices such as input devices (e.g., keyboard, mouse, pen, voice input device, touch input device) or other peripherals (e.g., printer, scanner, etc.) via one or more I/O ports 258. The example communication device 246 may include a network controller 260 that may be arranged to communicate with one or more other computing devices 262 over a network communication link via one or more communication ports 264.
The network communication link may be one example of a communication medium. Communication media may typically be embodied by computer readable instructions, data structures, program modules, and may include any information delivery media in a modulated data signal, such as a carrier wave or other transport mechanism. A "modulated data signal" may be a signal that has one or more of its data set or changed in such a manner as to encode information in the signal. By way of non-limiting example, communication media may include wired media such as a wired network or special purpose network, and wireless media such as acoustic, radio Frequency (RF), microwave, infrared (IR) or other wireless media. The term computer readable media as used herein may include both storage media and communication media.
In computing device 200 according to the present invention, program 222 includes program instructions of application execution method 300 that may instruct processor 204 to perform some of the steps of application execution method 300 that are executed in computing device 200 according to the present invention, so that portions of computing device 200 execute the application by executing application execution method 300 according to the present invention.
Computing device 200 may be implemented as a server, such as a file server, database, server, application server, etc., such as a Personal Digital Assistant (PDA), wireless web-watch device, application-specific device, or a hybrid device that may include any of the above functions. May be implemented as a personal computer including desktop and notebook computer configurations, and in some embodiments, computing device 200 is configured to apply method 300.
Fig. 3 shows a flow diagram of an application running method 300 according to an exemplary embodiment of the invention. The application running method 300 of the present invention is suitable for execution in a computing device and is further suitable for execution in a computing device 200 as shown in fig. 1. As shown in fig. 3, the instruction execution method 300 starts with step S310, and an executable file of an application program is generated according to the application file 211.
The application files 211 stored in the external memory 210 cannot be directly loaded into the internal memory 230 without preprocessing. According to one embodiment of the invention, application file 211 requires steps such as compiling, assembling, and linking it by operating system 220 to obtain an executable file for the application program. The steps and methods by which the operating system 220 pre-processes the application file 211 are not limited by the present invention.
Subsequently, step S320 is performed to determine, according to the executable file of the application program, first storage information stored in the internal memory 230 by the application program, the first storage information including first section information of the uninitialized data sections allocated in the internal memory 230.
The first storage information stored in the internal memory 230 by the application program includes section information of a plurality of memory sections. The divided memory sections in the internal memory 230 include a heap section, a stack section, a code section, an initialized data section, and an uninitialized data section. The memory segment is divided in the internal memory 230 according to the first memory information by the operating system 220 when creating a process, which determines the first memory information according to the file information of the application executable file. The uninitialized data segment stores uninitialized data in an executable file, including uninitialized global variables in an application.
When determining the first storage information stored in the internal memory 230 by the application program according to the executable file of the application program, the first section size and the first alignment information of the uninitialized data sections allocated in the internal memory 230 are determined according to the executable file. Specifically, determining the size of a first section according to uninitialized data in an executable file, namely, how many uninitialized global variables exist in an application program; the application alignment of the executable file stored in the internal memory 230 is then determined as the first alignment information based on the processor's pointing pattern decision. The first alignment information indicates from which alignment boundary the start address of the uninitialized data segment should start (e.g., 2, 4, 8, 32 byte alignment, etc.) it determines the start position of the uninitialized data segment, and is specifically determined by the instruction manner of the processor.
First section information of the uninitialized data section is then generated according to the first section size and the first alignment information, the first section information including the first section size and the first alignment information.
And generating first storage information according to the first section information, and taking the first section information of the uninitialized data section and the section information of other data sections as the first storage information. Other data sections include a heap section, a stack section, a code section, and an initialization data section.
Subsequently, step S330 is performed to generate second section information of the uninitialized data section according to the first section information and the module file 212.
FIG. 4 illustrates a schematic diagram of inserting a module file into an uninitialized data segment according to an exemplary embodiment of the present invention. As shown in fig. 4, the module file 414 is inserted into the uninitialized data section 415, and the section information of the uninitialized data section 415 is the first section information calculated according to steps S310 and S320. When loading the executable file in the internal memory 230, the storage space required for storing the executable file is increased; specifically, memory space is reserved for module file 414 in uninitialized data field 415. The reserved storage space itself is not in the storage space required for storing the executable file, and by adding the reserved storage space, the insertion of the module file 414 into the uninitialized data section 415 can be realized. The module file 414 is identical to the module file 212 of fig. 1, but if the module file 212 cannot be directly stored in the internal memory 230, the module file 212 needs to be preprocessed to obtain the module file 414.
After inserting the module file 414 into the uninitialized data section 415, an uninitialized data section 425 is obtained. The uninitialized data segment 425 is changed in size and starting position from the uninitialized data segment 415, and the segment information of the uninitialized data segment 425 needs to be recalculated to obtain the second segment information.
Fig. 5 shows a flow diagram of inserting a module file according to an exemplary embodiment of the invention. As shown in fig. 5, first section information is acquired, a second section size is generated according to the first section size and the module file 212, and when the second section size is generated, the first section size and the file size of the module file 212 are added to obtain the second section size.
Next, second alignment information is generated according to the first alignment information and the module file 212, where the first alignment information includes an application alignment method, and the application alignment method refers to an alignment boundary from which a start address of an uninitialized data segment should start, and determines a start position of the uninitialized data segment. When generating the second alignment information, the module alignment is generated according to the application alignment, from which alignment boundary the uninitialized data segment starts, and from which alignment boundary the module file 212 starts, so as to ensure that the module alignment of the module file 212 in the internal memory 230 is the same as the application alignment of the executable file in the internal memory 230.
According to one embodiment of the invention, uninitialized data segments are aligned in 32-bit bytes, and then module file 212 is also aligned in 32-bit bytes.
And then generating second alignment information according to the application alignment mode and the module alignment mode. The second alignment information includes an application alignment mode and a module alignment mode.
Second section information of the uninitialized data section is then generated according to the second section size and the second alignment information. The second section information includes a second section size and second alignment information.
Subsequently, step S340 is performed to generate second storage information from the second section information and the first storage information. And when the second storage information is generated, combining the second section information of the uninitialized data section with the section information of other data sections in the first storage information to obtain the second storage information. Other data sections include a heap section, a stack section, a code section, and an initialization data section.
Subsequently, step S350 is performed to load the executable file of the application program and the module file 212 into the internal memory 230 according to the second storage information. When the executable file of the application program and the module file 212 are loaded into the internal memory 230, the executable file is first loaded into the internal memory 230 according to the second storage information. When the executable file is loaded into the internal memory 230 according to the second storage information, an uninitialized data section is allocated in the internal memory 230 according to the second section size, and uninitialized data of the executable file is stored in the uninitialized data section. As shown in fig. 4, the allocated uninitialized data segments 425 are increased in size relative to the calculated uninitialized data segments 415, and the increased reserved memory space is used for storing the module files 414. The uninitialized data for the application to be stored by the otherwise uninitialized data segment 415 is still stored in the uninitialized data segment 425.
Then, the module file 212 is loaded into the uninitialized data segment according to the second segment information of the uninitialized data segment in the second storage information. When the module file 212 is loaded into the uninitialized data section, a module alignment mode is determined according to a second alignment mode of the second section information, and the module file 212 is stored in the uninitialized data section according to the module alignment mode.
In accordance with one embodiment of the present invention, the module is aligned in a 32-bit byte alignment, and module file 212 is stored in uninitialized data segment 425 with the 32-bit byte as an alignment boundary.
According to one embodiment of the present invention, when the module file 212 is loaded into the uninitialized data segment, the starting position of the module file 212 stored in the uninitialized data segment is also calculated, so that the module file 212 is called according to the starting position to generate a function module, and additional functions of the application program are realized.
Finally, step S360 is executed to run the application program according to the executable file and the module file 212 in the internal memory 230, and construct a function module in the application program to implement the additional functions of the application program. Included in internal memory 230 are executable files and module files 212 that can be directly called for execution, which can be directly called by operating system 220 to run applications. And, the operating system 220 generates a function module according to the calculated starting position of the module file 212 stored in the uninitialized data section, so as to realize the additional function of the application program.
According to one embodiment of the present invention, the functional module may be implemented as a locking module, where during the running process of the application program, the executing code generates an abnormal access to the boundary, and when a thread processes the abnormal access to the boundary, the locking module may implement an additional function of locking the thread, so as to protect the abnormal processing process from being interrupted, so as to ensure that the operating system 220 can normally process the abnormality, and enable the program to run smoothly. The application program running method is suitable for being executed in a computing device, and the computing device comprises an external memory and an internal memory, wherein the external memory stores application files and module files. Firstly, generating an executable file of an application program according to an application file, and when the application program is loaded, processing the application file in an external memory to obtain the executable file of a binary type file, wherein the executable file can be stored in an internal memory. The first storage information stored in the internal memory by the application program is then determined from the executable file of the application program, the first storage information including first section information of the allocated uninitialized data sections in the internal memory. When loading an executable file of an application program in an internal memory, dividing a plurality of sections in the internal memory, and loading corresponding data of the executable file in each section; in order to load the module file into the uninitialized data section, the second section information of the uninitialized data section needs to be regenerated according to the first section information of the uninitialized data section and the module file. And generating second storage information according to the second section information and the first storage information so as to load the executable file and the module file of the application program into the internal memory according to the second storage information. After the executable file and the module file of the application program are loaded into the internal memory together, the functional module can be built in the application program to realize the additional functions of the application program.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be construed as reflecting the intention that: i.e., the claimed invention requires more features than are expressly recited in each claim.
Those skilled in the art will appreciate that the modules or units or groups of devices in the examples disclosed herein may be arranged in a device as described in this embodiment, or alternatively may be located in one or more devices different from the devices in this example. The modules in the foregoing examples may be combined into one module or may be further divided into a plurality of sub-modules.
Those skilled in the art will appreciate that the modules in the apparatus of the embodiments may be adaptively changed and disposed in one or more apparatuses different from the embodiments. The modules or units or groups of embodiments may be combined into one module or unit or group, and furthermore they may be divided into a plurality of sub-modules or sub-units or groups. Any combination of all features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or units of any method or apparatus so disclosed, may be used in combination, except insofar as at least some of such features and/or processes or units are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings), may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features but not others included in other embodiments, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments.
Furthermore, some of the embodiments are described herein as methods or combinations of method elements that may be implemented by a processor of a computer system or by other means of performing the functions. Thus, a processor with the necessary instructions for implementing the described method or method element forms a means for implementing the method or method element. Furthermore, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is for carrying out the functions performed by the elements for carrying out the objects of the invention.
The various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions of the methods and apparatus of the present invention, may take the form of program code (i.e., instructions) embodied in tangible media, such as floppy diskettes, CD-ROMs, hard drives, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
In the case of program code execution on programmable computers, the computing device will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to execute the inventive method of determining a shutdown state of the device in accordance with instructions in said program code stored in the memory.
By way of example, and not limitation, computer readable media comprise computer storage media and communication media. Computer-readable media include computer storage media and communication media. Computer storage media stores information such as computer readable instructions, data structures, program modules, or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of computer readable media.
As used herein, unless otherwise specified the use of the ordinal terms "first," "second," "third," etc., to describe a general object merely denote different instances of like objects, and are not intended to imply that the objects so described must have a given order, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of the above description, will appreciate that other embodiments are contemplated within the scope of the invention as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. The disclosure of the present invention is intended to be illustrative, but not limiting, of the scope of the invention, which is defined by the appended claims.

Claims (7)

1. An application running method adapted to be executed in a computing device comprising an internal memory and an external memory, the external memory having stored therein application files and module files, the method comprising the steps of:
generating an executable file of the application program according to the application file;
determining first storage information stored by an application program in the internal memory according to an executable file of the application program, wherein the first storage information comprises first section information of an uninitialized data section distributed in the internal memory;
generating second section information of the uninitialized data section according to the first section information and the module file;
generating second storage information according to the second section information and the first storage information;
loading executable files and module files of the application program into the internal memory according to the second storage information;
running the application program according to the executable file and the module file in the internal memory, and constructing a function module in the application program to realize the additional function of the application program;
wherein, according to the executable file of the application program, determining the first storage information stored in the internal memory by the application program includes the steps of:
determining a first segment size and first alignment information of an uninitialized data segment allocated in the internal memory according to the executable file;
generating first section information of the uninitialized data section according to the first section size and first alignment information;
generating first storage information according to the first section information;
the generating the second section information according to the first section information and the module file includes the steps of:
generating a second section size according to the first section size and the module file;
generating second alignment information according to the first alignment information and the module file;
generating second section information of the uninitialized data section according to the second section size and second alignment information;
the first alignment information includes an application alignment mode, and the generating second alignment information according to the first alignment information and the module file includes the steps of:
generating a module alignment mode according to the application alignment mode;
and generating second alignment information according to the application alignment mode and the module alignment mode to ensure that the module alignment mode of the module file in the internal memory is the same as the application alignment mode of the executable file in the internal memory.
2. The method of claim 1, wherein the generating a second section size from the first section size and the module file comprises the steps of:
and adding the first section size and the file size of the module file to obtain the second section size.
3. The method of claim 1, wherein the loading the executable file and the module file of the application program into the internal memory according to the second storage information comprises the steps of:
loading the executable file into the internal memory according to the second storage information;
and loading the module file into the uninitialized data section according to the second section information of the uninitialized data section in the second storage information.
4. The method of claim 3, wherein said loading said executable file into said internal memory according to said second stored information comprises the steps of:
allocating an uninitialized data segment in the internal memory according to the second segment size;
and storing the uninitialized data of the executable file in the uninitialized data section.
5. The method of claim 3 or 4, wherein the loading the module file into the uninitialized data segment according to the second segment information of the uninitialized data segment in the second storage information comprises the steps of:
determining a module alignment mode according to a second alignment mode of the second section information;
and storing the module file in the uninitialized data section according to the module alignment mode.
6. A computing device, comprising:
one or more processors;
a memory; and
one or more apparatuses comprising instructions for performing the method of any of claims 1-5.
7. A computer readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by a computing device, cause the computing device to perform the method of any of claims 1-5.
CN202111115289.8A 2021-09-23 2021-09-23 Application program running method, computing device and storage medium Active CN113849245B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111115289.8A CN113849245B (en) 2021-09-23 2021-09-23 Application program running method, computing device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111115289.8A CN113849245B (en) 2021-09-23 2021-09-23 Application program running method, computing device and storage medium

Publications (2)

Publication Number Publication Date
CN113849245A CN113849245A (en) 2021-12-28
CN113849245B true CN113849245B (en) 2023-09-12

Family

ID=78978899

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111115289.8A Active CN113849245B (en) 2021-09-23 2021-09-23 Application program running method, computing device and storage medium

Country Status (1)

Country Link
CN (1) CN113849245B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113821273B (en) * 2021-09-23 2023-10-13 武汉深之度科技有限公司 Application program running method, computing device and storage medium

Citations (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101115180A (en) * 2007-09-07 2008-01-30 中兴通讯股份有限公司 Electronic program menu system and functional module dynamic load operating method
CN101320335A (en) * 2007-06-07 2008-12-10 国际商业机器公司 Method and apparatus for cooperative software multitasking in a processor system with a partitioned register file
CN101546268A (en) * 2008-03-25 2009-09-30 大唐移动通信设备有限公司 Method for loading executable file for digital signal processor and device thereof
CN101697131A (en) * 2009-11-04 2010-04-21 中兴通讯股份有限公司 Method and device for dynamically loading relocatable file
CN104881611A (en) * 2014-02-28 2015-09-02 国际商业机器公司 Method and apparatus for protecting sensitive data in software product
CN105184118A (en) * 2015-08-31 2015-12-23 西北大学 Code fragmentization based Android application program packing protection method and apparatus
CN105426223A (en) * 2015-12-25 2016-03-23 百度在线网络技术(北京)有限公司 Application loading method and device
CN106897587A (en) * 2017-02-27 2017-06-27 百度在线网络技术(北京)有限公司 The method and apparatus of reinforcement application, loading reinforcement application
CN107122216A (en) * 2017-05-19 2017-09-01 北京计算机技术及应用研究所 A kind of embedded real-time operating system dynamic loading method
CN107169370A (en) * 2017-04-21 2017-09-15 广州优视网络科技有限公司 The encryption method and encryption device of executable file
CN107515808A (en) * 2017-08-08 2017-12-26 百富计算机技术(深圳)有限公司 Log recording method, device, computer equipment and computer-readable recording medium
CN108089977A (en) * 2017-11-28 2018-05-29 维沃移动通信有限公司 A kind of abnormality eliminating method of application program, device and mobile terminal
CN108985017A (en) * 2018-09-26 2018-12-11 北京京东金融科技控股有限公司 The reinforcement means and device of application program
CN109284142A (en) * 2018-08-15 2019-01-29 Oppo广东移动通信有限公司 File preloads method, apparatus, electronic equipment and computer readable storage medium
CN109814939A (en) * 2017-11-20 2019-05-28 华为技术有限公司 The production method and device of a kind of dynamic loading method, file destination
CN109840105A (en) * 2018-12-24 2019-06-04 苏州蜗牛数字科技股份有限公司 A kind of hot update method that do not withdraw
CN109992974A (en) * 2017-12-29 2019-07-09 中兴通讯股份有限公司 Guard method, equipment and the readable storage medium storing program for executing of Virtual Machine bytecodes file
CN110147653A (en) * 2019-03-28 2019-08-20 江苏通付盾信息安全技术有限公司 Application security reinforcement means and device
CN110442327A (en) * 2018-05-03 2019-11-12 阿里巴巴集团控股有限公司 A kind of application builds method, apparatus, server
CN111046389A (en) * 2018-10-11 2020-04-21 东硕资讯股份有限公司 Method for securely updating firmware components and portable computer station for implementation
CN111198777A (en) * 2020-01-03 2020-05-26 北京字节跳动网络技术有限公司 Data processing method, device, terminal and storage medium
CN111666096A (en) * 2020-07-02 2020-09-15 腾讯科技(深圳)有限公司 Hot updating method and device for target application, storage medium and electronic equipment
CN111813460A (en) * 2020-06-01 2020-10-23 北京百卓网络技术有限公司 Access method, device, equipment and storage medium for application program matching file
CN111913756A (en) * 2020-07-08 2020-11-10 北京达佳互联信息技术有限公司 Application program optimization method, device and system, electronic equipment and storage medium
CN112130926A (en) * 2020-09-17 2020-12-25 百富计算机技术(深圳)有限公司 Application program running method and device, terminal equipment and storage medium
CN112416466A (en) * 2020-12-02 2021-02-26 车智互联(北京)科技有限公司 Application program loading method, mobile terminal and readable storage medium
CN113010186A (en) * 2021-02-05 2021-06-22 武汉联特科技股份有限公司 Firmware and application data integration method and system applied to optical module

Patent Citations (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101320335A (en) * 2007-06-07 2008-12-10 国际商业机器公司 Method and apparatus for cooperative software multitasking in a processor system with a partitioned register file
CN101115180A (en) * 2007-09-07 2008-01-30 中兴通讯股份有限公司 Electronic program menu system and functional module dynamic load operating method
CN101546268A (en) * 2008-03-25 2009-09-30 大唐移动通信设备有限公司 Method for loading executable file for digital signal processor and device thereof
CN101697131A (en) * 2009-11-04 2010-04-21 中兴通讯股份有限公司 Method and device for dynamically loading relocatable file
CN104881611A (en) * 2014-02-28 2015-09-02 国际商业机器公司 Method and apparatus for protecting sensitive data in software product
CN105184118A (en) * 2015-08-31 2015-12-23 西北大学 Code fragmentization based Android application program packing protection method and apparatus
CN105426223A (en) * 2015-12-25 2016-03-23 百度在线网络技术(北京)有限公司 Application loading method and device
CN106897587A (en) * 2017-02-27 2017-06-27 百度在线网络技术(北京)有限公司 The method and apparatus of reinforcement application, loading reinforcement application
CN107169370A (en) * 2017-04-21 2017-09-15 广州优视网络科技有限公司 The encryption method and encryption device of executable file
CN107122216A (en) * 2017-05-19 2017-09-01 北京计算机技术及应用研究所 A kind of embedded real-time operating system dynamic loading method
CN107515808A (en) * 2017-08-08 2017-12-26 百富计算机技术(深圳)有限公司 Log recording method, device, computer equipment and computer-readable recording medium
CN109814939A (en) * 2017-11-20 2019-05-28 华为技术有限公司 The production method and device of a kind of dynamic loading method, file destination
CN108089977A (en) * 2017-11-28 2018-05-29 维沃移动通信有限公司 A kind of abnormality eliminating method of application program, device and mobile terminal
CN109992974A (en) * 2017-12-29 2019-07-09 中兴通讯股份有限公司 Guard method, equipment and the readable storage medium storing program for executing of Virtual Machine bytecodes file
CN110442327A (en) * 2018-05-03 2019-11-12 阿里巴巴集团控股有限公司 A kind of application builds method, apparatus, server
CN109284142A (en) * 2018-08-15 2019-01-29 Oppo广东移动通信有限公司 File preloads method, apparatus, electronic equipment and computer readable storage medium
CN108985017A (en) * 2018-09-26 2018-12-11 北京京东金融科技控股有限公司 The reinforcement means and device of application program
CN111046389A (en) * 2018-10-11 2020-04-21 东硕资讯股份有限公司 Method for securely updating firmware components and portable computer station for implementation
CN109840105A (en) * 2018-12-24 2019-06-04 苏州蜗牛数字科技股份有限公司 A kind of hot update method that do not withdraw
CN110147653A (en) * 2019-03-28 2019-08-20 江苏通付盾信息安全技术有限公司 Application security reinforcement means and device
CN111198777A (en) * 2020-01-03 2020-05-26 北京字节跳动网络技术有限公司 Data processing method, device, terminal and storage medium
CN111813460A (en) * 2020-06-01 2020-10-23 北京百卓网络技术有限公司 Access method, device, equipment and storage medium for application program matching file
CN111666096A (en) * 2020-07-02 2020-09-15 腾讯科技(深圳)有限公司 Hot updating method and device for target application, storage medium and electronic equipment
CN111913756A (en) * 2020-07-08 2020-11-10 北京达佳互联信息技术有限公司 Application program optimization method, device and system, electronic equipment and storage medium
CN112130926A (en) * 2020-09-17 2020-12-25 百富计算机技术(深圳)有限公司 Application program running method and device, terminal equipment and storage medium
CN112416466A (en) * 2020-12-02 2021-02-26 车智互联(北京)科技有限公司 Application program loading method, mobile terminal and readable storage medium
CN113010186A (en) * 2021-02-05 2021-06-22 武汉联特科技股份有限公司 Firmware and application data integration method and system applied to optical module

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
可执行文件的改造技术;王晓亮;工业控制计算机(第2期);32-35 *

Also Published As

Publication number Publication date
CN113849245A (en) 2021-12-28

Similar Documents

Publication Publication Date Title
EP1577767B1 (en) Code rewriting
US10635823B2 (en) Compiling techniques for hardening software programs against branching programming exploits
US8843920B2 (en) Systems and methods for deferring software implementation decisions until load time
EP3455736B1 (en) Dynamically sized locals with precise garbage collection reporting
CN112988252B (en) Operating system starting method and computing device
CN114691240A (en) Drive hardware configuration information loading method, device and system and computing equipment
CN106462426B (en) Combined computational tasks for a graphics processing unit
US20140157291A1 (en) Method and system for binding objects in dynamic programming languages using caching techniques
CN113849245B (en) Application program running method, computing device and storage medium
CN112947976A (en) Operating system upgrading method, computing device and storage medium
CN114003289A (en) Application program running method, computing device and storage medium
CN113805971B (en) Application program running method, computing device and storage medium
CN113821272B (en) Application program running method, computing device and storage medium
CN113238760A (en) Software migration method and device, computing equipment and readable storage medium
JP2015210769A (en) Information processing device, information processing method, and program
CN113821273B (en) Application program running method, computing device and storage medium
JP2007080049A (en) Built-in program generation method, built-in program development system and information table section
CN114168489B (en) Function information acquisition method, computing device and storage medium
CN113867825B (en) Multi-system operation method, computing equipment and storage medium
CN114579135B (en) Installation package generation method and device
CN113835927B (en) Instruction execution method, computing device and storage medium
JP6295914B2 (en) Programmable controller system, its support device, programmable controller
CN111752620A (en) Processing method and loading method of kernel module
JP2006113935A (en) Dynamic link library calling code generation method, program, and apparatus
CN114217904A (en) Multi-version application operation method, computing device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant