CN109614254A - A kind of Dylib reference delet method and relevant apparatus - Google Patents
A kind of Dylib reference delet method and relevant apparatus Download PDFInfo
- Publication number
- CN109614254A CN109614254A CN201811612173.3A CN201811612173A CN109614254A CN 109614254 A CN109614254 A CN 109614254A CN 201811612173 A CN201811612173 A CN 201811612173A CN 109614254 A CN109614254 A CN 109614254A
- Authority
- CN
- China
- Prior art keywords
- dylib
- loadcommand
- target
- deleted
- bytes
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 40
- 238000003860 storage Methods 0.000 claims abstract description 27
- 230000037430 deletion Effects 0.000 claims description 29
- 238000012217 deletion Methods 0.000 claims description 23
- OKTJSMMVPCPJKN-UHFFFAOYSA-N Carbon Chemical compound [C] OKTJSMMVPCPJKN-UHFFFAOYSA-N 0.000 claims description 12
- 229910052799 carbon Inorganic materials 0.000 claims description 12
- 230000000694 effects Effects 0.000 abstract description 13
- 239000002699 waste material Substances 0.000 abstract description 9
- 230000008569 process Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 5
- 238000007792 addition Methods 0.000 description 4
- 238000004590 computer program Methods 0.000 description 4
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 239000000047 product Substances 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000008878 coupling Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 210000004556 brain Anatomy 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 238000005538 encapsulation Methods 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 239000013589 supplement Substances 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a kind of Dylib to quote delet method, Dylib reference to be deleted is determined first, then the target LoadCommand for saving the reference is determined in Macho file, the byte of target LoadCommand is set to redundancy bytes, although to be not carried out actual delete operation, since the byte of target LoadCommand has all been set to redundancy bytes, the reference effect of its script is also not present, to realize the effect for deleting corresponding logic program segment;And the corresponding data resource of target LoadCommand is available, for being replicated new LoadCommand, to solve the problems, such as the waste of data resource in Macho file.It is quoted the present invention also provides a kind of Dylib and deletes device, system and computer readable storage medium, above-mentioned technical effect equally may be implemented.
Description
Technical field
The present invention relates to field of computer technology more particularly to a kind of Dylib reference delet method, device, system and meters
Calculation machine readable storage medium storing program for executing.
Background technique
Apple Inc. exploitation two kinds of operating systems iOS or MacOS in, the installation kit of application program be usually ipa or
The file of dmg format, this document is substantially a compressed package, and the inside contains is always or usually as specified needed for an application program
Material has a kind of file of Macho type in these materials, and this document is the executable file of iOS or MacOS, it comprises
All formula logics in application program.
Dylib file is " dynamic base " file, it contains formula segment, it carries out the formula logic of some versatilities
Encapsulation is provided to different application programs and uses.Macho file can be patrolled by quoting these formula segments progress function
The supplement collected, that is, addition includes the reference information of the Dylib file of these formula segments in Macho file, also in Macho
Corresponding Dylib reference is added in file;The deletion of function logic can also be carried out by deleting formula segment.
But when Macho file needs to delete the corresponding logic function of some Dylib file, can not directly by
Corresponding Dylib reference is deleted in Macho file, and is only deleted the formula logic in Dylib file, or patrolled with a nothing
The Dylib file collected replaces, and corresponding reference information still can exist in Macho file in Macho file, can't disappear
It removes, this will largely effect on the data resource of Macho file.
Summary of the invention
The main purpose of the present invention is to provide a kind of Dylib reference delet method, device, system and computer-readable deposit
Storage media, it is intended to solve the problems, such as the data resource of useless Dylib citation impact Macho file existing in the prior art.
To achieve the above object, a kind of Dylib provided by the invention quotes delet method, which comprises
Determine Dylib reference to be deleted;
It determines in Macho file for saving the target LoadCommand of the Dylib reference to be deleted;
All bytes of the target LoadCommand are set to redundancy bytes, to complete the Dylib reference to be deleted
Deletion;Wherein the redundancy bytes are in the Macho file for being replicated into the byte of new LoadCommand.
Optionally, the redundancy bytes are the byte that all positions are 0.
Optionally, all bytes by the target LoadCommand are set to before redundancy bytes, further includes:
All bytes of the target LoadCommand are moved to all LoadCommand in current Macho file
Tail portion.
Optionally, all bytes by the target LoadCommand are set to after redundancy bytes, further includes:
It makes carbon copies the target LoadCommand and adds new Dylib reference.
To achieve the above object, it is quoted the present invention further provides a kind of Dylib and deletes device, described device includes storage
Device and processor, program is deleted in the Dylib reference that be stored on the memory to run on the processor, described
Dylib reference deletes when program is executed by the processor and realizes following method:
Determine Dylib reference to be deleted;
It determines in Macho file for saving the target LoadCommand of the Dylib reference to be deleted;
All bytes of the target LoadCommand are set to redundancy bytes, to complete the Dylib reference to be deleted
Deletion;Wherein the redundancy bytes are in the Macho file for being replicated into the byte of new LoadCommand.
Optionally, the redundancy bytes are the byte that all positions are 0.
Optionally, it when the Dylib reference deletion program is executed by the processor, also realizes:
Before all bytes by the target LoadCommand are set to redundancy bytes, by the target
All bytes of LoadCommand are moved to the tail portion of all LoadCommand in current Macho file.
Optionally, it when the Dylib reference deletion program is executed by the processor, also realizes:
It makes carbon copies the target LoadCommand and adds new Dylib reference.
To achieve the above object, the present invention further provides a kind of Dylib to quote deletion system, the system comprises:
First determining module, for determining Dylib reference to be deleted;
Second determining module, for determining in Macho file for saving the target of the Dylib reference to be deleted
LoadCommand;
Removing module, for all bytes of the target LoadCommand to be set to redundancy bytes, with complete it is described to
Delete the deletion of Dylib reference;Wherein the redundancy bytes are new for being replicated into the Macho file
The byte of LoadCommand.
To achieve the above object, the present invention further provides a kind of computer readable storage mediums, described computer-readable
It is stored with Dylib reference on storage medium and deletes program, program is deleted in the Dylib reference to be held by one or more processors
Row, to realize that described in any item Dylib such as quote delet method.
To achieve the above object, the present invention further provides a kind of computer program products, including computer instruction, work as institute
When stating computer instruction and running on computers, the computer is allowed to execute aforementioned disclosed Dylib reference deletion side
Method.
As it can be seen that the present invention determines Dylib reference to be deleted first, is then determined in Macho file and save the reference
All bytes of target LoadCommand are set to redundancy bytes, although to be not carried out reality by target LoadCommand
Delete operation, still, since the byte of target LoadCommand has all been set to redundancy bytes, the reference effect of script
Also it is not present, to realize the effect for deleting corresponding logic program segment;And it is target LoadCommand is corresponding
Data resource is available, for being replicated new LoadCommand, to solve the waste of data resource in Macho file
Problem.
Detailed description of the invention
Fig. 1 is the flow diagram of one embodiment of the invention;
Fig. 2 is the schematic diagram of internal structure that device is deleted in the Dylib reference that one embodiment of the invention discloses;
Fig. 3 is the structural schematic diagram that the Dylib that one embodiment of the invention discloses quotes deletion system.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right
The present invention is further elaborated.It should be appreciated that described herein, specific examples are only used to explain the present invention, not
For limiting the present invention.Based on the embodiments of the present invention, those of ordinary skill in the art are not before making creative work
Every other embodiment obtained is put, shall fall within the protection scope of the present invention.
The description and claims of this application and term " first ", " second ", " third ", " in above-mentioned attached drawing
The (if present)s such as four " are to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should manage
The data that solution uses in this way are interchangeable under appropriate circumstances, so that the embodiments described herein can be in addition to illustrating herein
Or the sequence other than the content of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that
Cover it is non-exclusive include, for example, containing the process, method, system, product or equipment of a series of steps or units need not limit
In step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, produce
The other step or units of product or equipment inherently.
It should be noted that the description for being related to " first ", " second " etc. in the present invention is used for description purposes only, and cannot
It is interpreted as its relative importance of indication or suggestion or implicitly indicates the quantity of indicated technical characteristic.Define as a result, " the
One ", the feature of " second " can explicitly or implicitly include at least one of the features.In addition, the skill between each embodiment
Art scheme can be combined with each other, but must be based on can be realized by those of ordinary skill in the art, when technical solution
Will be understood that the combination of this technical solution is not present in conjunction with there is conflicting or cannot achieve when, also not the present invention claims
Protection scope within.
The present invention provides a kind of Dylib reference delet method, device, system and computer readable storage medium, it is intended to solve
The problem of data resource of useless Dylib citation impact Macho file certainly existing in the prior art.
Referring to Fig.1, Fig. 1 is the flow diagram of one embodiment of the invention.
In one embodiment, this method comprises:
S101 determines Dylib reference to be deleted.
Specifically, it is first determined Dylib reference to be deleted, that is, the Dylib file to be deleted of determination is in Macho text
Reference information in part.
S102 is determined in Macho file for saving the target LoadCommand of the Dylib reference to be deleted.
It should be noted that Macho file has specific composition format, wherein the part for quoting Dylib is located at
The region LoadCommands, wherein region refers to the byte in a segment limit, and the region LoadCommands indicates that segment limit
Byte is all for storing the relevant information of LoadCommands.The region LoadCommands is by multiple LoadCommand
Composition, a LoadCommand saves the reference information of a Dylib, so additions and deletions Dylib is exactly to pass through additions and deletions
LoadCommand in the region LoadCommands is realized.
Therefore, it is determined in this programme in Macho file for saving the target of Dylib reference to be deleted
LoadCommand。
All bytes of the target LoadCommand are set to redundancy bytes by S103, described to be deleted to complete
The deletion of Dylib reference;Wherein the redundancy bytes are in the Macho file for being replicated into new LoadCommand's
Byte.
It should be noted that having a limitation when modifying the byte in the region LoadCommands, cannot exactly change
The region totality byte quantity.This is also that the reason of can not deleting Dylib reference directly in Macho file, Dylib is quoted
It directly deletes, then the byte number that will lead in LoadCommands tails off, so that the program can not be implemented.
And the requirement being aligned by memory, the region LoadCommands can have some redundancy bytes in its tail portion, these redundancies
Byte can be replicated into new LoadCommand, and increasing LoadCommand operation can be by making carbon copies these redundancy bytes
It completes, one LoadCommand information of every addition will occupy a part of redundancy bytes, exhaust until by redundancy bytes.
Therefore, in the present solution, all bytes of target LoadCommand are all set to redundancy bytes, thus corresponding
The byte of the LoadCommand can all be replicated into new LoadCommand, although to be not carried out actual deletion
Operation, still, since the byte of target LoadCommand has all been set to redundancy bytes, the reference effect of script is not also deposited
To realize the effect for deleting corresponding logic program segment;And the corresponding data of target LoadCommand are provided
Source is available, for being replicated new LoadCommand, to solve the problems, such as the waste of data resource in Macho file.
In a specific embodiment, redundancy bytes are the byte that all positions are 0.
As it can be seen that the present invention determines Dylib reference to be deleted first, is then determined in Macho file and save the reference
The byte of target LoadCommand is set to redundancy bytes by target LoadCommand, although to be not carried out actual delete
Except operation, still, since the byte of target LoadCommand has all been set to redundancy bytes, the reference of script is acted on also not
In the presence of to realize the effect for deleting corresponding logic program segment;And by the corresponding data of target LoadCommand
Resource is available, for being replicated new LoadCommand, to solve the problems, such as the waste of data resource in Macho file.
On the basis of previous embodiment, the present embodiment is further detailed and optimizes to technical solution.
It is specific as follows:
Before previous embodiment step S103, the method also includes:
All bytes of the target LoadCommand are moved to all LoadCommand in current Macho file
Tail portion.
It should be noted that after since target LoadCommand is set to redundancy bytes, corresponding redundancy bytes
It is replicated into new LoadCommand again, and when the no longer tail portion in the region LoadCommands target LoadCommand,
Since the back target LoadCommand also has other LoadCommand, so corresponding superfluous in target LoadCommand
The byte number that remaining byte goes out the LoadCommand made carbon copies can only be less than or be equal to target LoadCommand, will receive byte number
Limitation.And the tail portion in the region LoadCommands has pre-added redundancy bytes, it, can be in order to reduce the limitation of byte number
Target LoadCommand is first moved to the tail portion LoadCommands, is then set to redundancy bytes again, is being made carbon copies newly in this way
When LoadCommand, byte limitation is no longer just the byte number of target LoadCommand, but the word of all redundancy bytes
Joint number is more convenient the management of subsequent newly-increased LoadCommand and the management of redundancy word joint number.
On the basis of previous embodiment, the present embodiment is further detailed and optimizes to technical solution.
It is specific as follows:
After previous embodiment step S103, the method also includes:
It makes carbon copies the target LoadCommand and adds new Dylib reference.
It should be noted that since target LoadCommand has been set to redundancy bytes, it can be in corresponding position
New Dylib reference is added by manifolding redundancy bytes, to avoid the data resource waste to Macho file.
Further, the present embodiment also discloses a kind of Dylib reference deletion device.
It is that the schematic diagram of internal structure of device is deleted in the Dylib reference that one embodiment of the invention discloses referring to Fig. 2, Fig. 2.Figure
In 2, it includes memory 11 and processor 12 that device 1 is deleted in Dylib reference, and being stored on the memory 11 can be in the processing
Program is deleted in the Dylib reference run on device 12, and the Dylib reference, which is deleted when program is executed by the processor 12, to be realized such as
Lower method: Dylib reference to be deleted is determined;It determines in Macho file for saving the target of the Dylib reference to be deleted
LoadCommand;All bytes of the target LoadCommand are set to redundancy bytes, to complete the Dylib to be deleted
The deletion of reference;Wherein the redundancy bytes are in the Macho file for being replicated into the byte of new LoadCommand.
As it can be seen that the present invention determines Dylib reference to be deleted first, is then determined in Macho file and save the reference
The byte of target LoadCommand is set to redundancy bytes by target LoadCommand, although to be not carried out actual delete
Except operation, still, since the byte of target LoadCommand has all been set to redundancy bytes, the reference of script is acted on also not
In the presence of to realize the effect for deleting corresponding logic program segment;And by the corresponding data of target LoadCommand
Resource is available, for being replicated new LoadCommand, to solve the problems, such as the waste of data resource in Macho file.
In a specific embodiment, the redundancy bytes are the byte that all positions are 0.
When the Dylib reference deletion program is executed by the processor 12, specifically it may be implemented: described by the target
All bytes of LoadCommand are set to before redundancy bytes, and all bytes of the target LoadCommand are moved to and are worked as
The tail portion of all LoadCommand in preceding Macho file.
When the Dylib reference deletion program is executed by the processor 12, it can also realize: make carbon copies the target
LoadCommand adds new Dylib reference.
In the present embodiment, device 1 is deleted in the Dylib reference can be PC (PersonalComputer, personal electricity
Brain), it is also possible to smart phone, tablet computer, palm PC, portable computer.
Further, referring to Fig. 2, it can also include bus 13 that device 1 is deleted in the Dylib reference, wherein the storage
Device 11 and the processor 12 are connected by the bus 13.
Wherein, memory 11 include at least a type of readable storage medium storing program for executing, the readable storage medium storing program for executing include flash memory,
Hard disk, multimedia card, card-type memory (for example, SD or DX memory etc.), magnetic storage, disk, CD etc..Memory 11
It can be the internal storage unit that device 1 is deleted in Dylib reference in some embodiments, such as device 1 is deleted in Dylib reference
Hard disk.Memory 11 is also possible to the External memory equipment that device 1 is deleted in Dylib reference in further embodiments, such as
The plug-in type hard disk being equipped on device 1, intelligent memory card (Smart Media Card, SMC), safe number are deleted in Dylib reference
Word (Secure Digital, SD) card, flash card (Flash Card) etc..Further, memory 11 can also both include
It also includes External memory equipment that the internal storage unit of device 1 is deleted in Dylib reference.Memory 11 can be not only used for storage peace
The application software and Various types of data for deleting device 1 are quoted loaded on Dylib, such as the code etc. of program is deleted in Dylib reference, may be used also
For temporarily storing the data that has exported or will export.
Processor 12 can be in some embodiments a central processing unit (Central Processing Unit,
CPU), controller, microcontroller, microprocessor or other data processing chips, the program for being stored in run memory 11
Code or processing data, such as execute Dylib reference and delete program etc..
Bus 13 can be Peripheral Component Interconnect standard (peripheral component interconnect, abbreviation
PCI) bus or expanding the industrial standard structure (extended industry standard architecture, abbreviation EISA)
Bus etc..The bus can be divided into address bus, data/address bus, control bus etc..For convenient for indicating, in Fig. 2 only with one slightly
Line indicates, it is not intended that an only bus or a type of bus.
Further, it can also include network interface 14 that device 1 is deleted in Dylib reference, and network interface 14 optionally can be with
Including wireline interface and/or wireless interface (such as WI-FI interface, blue tooth interface), dress is deleted commonly used in quoting in the Dylib
It sets and establishes communication connection between 1 and other electronic equipments.
Optionally, device 1 is deleted in Dylib reference to include user interface 15, and user interface 15 may include showing
Show that device (Display), input unit such as keyboard (Keyboard), optional user interface can also include that the wired of standard connects
Mouth, wireless interface.Optionally, in some embodiments, display can be light-emitting diode display, liquid crystal display, touch control type LCD
Display and OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) touch device etc..Wherein, it shows
Device appropriate can also be known as display screen or display unit, for be shown in Dylib reference delete in device 1 information that handles with
And for showing visual user interface.
Fig. 2 illustrates only the reference of the Dylib with component 11-15 and deletes device 1, it will be appreciated by those skilled in the art that
Be, Fig. 2 shows structure do not constitute to Dylib quote delete device 1 restriction, may include than illustrate it is less or more
Component, perhaps combine certain components or different component layouts.
Further, the present embodiment also discloses a kind of Dylib reference deletion system.
It is that the Dylib that one embodiment of the invention discloses quotes deletion system structural schematic diagram referring to Fig. 3, Fig. 3.
In Fig. 3, the Dylib quotes deletion system, comprising:
First determining module 301, for determining Dylib reference to be deleted;
Second determining module 302, for determining in Macho file for saving the target of the Dylib reference to be deleted
LoadCommand;
Removing module 303, for all bytes of the target LoadCommand to be set to redundancy bytes, to complete
State the deletion of Dylib reference to be deleted;Wherein the redundancy bytes are new for being replicated into the Macho file
The byte of LoadCommand.
As it can be seen that the present invention determines Dylib reference to be deleted first, is then determined in Macho file and save the reference
The byte of target LoadCommand is set to redundancy bytes by target LoadCommand, although to be not carried out actual delete
Except operation, still, since the byte of target LoadCommand has all been set to redundancy bytes, the reference of script is acted on also not
In the presence of to realize the effect for deleting corresponding logic program segment;And by the corresponding data of target LoadCommand
Resource is available, for being replicated new LoadCommand, to solve the problems, such as the waste of data resource in Macho file.
In a specific embodiment, the redundancy bytes are the byte that all positions are 0.
Further, the Dylib quotes deletion system, can also include: mobile module, for described by the target
All bytes of LoadCommand are set to before redundancy bytes, and all bytes of the target LoadCommand are moved to and are worked as
The tail portion of all LoadCommand in preceding Macho file.
Further, the Dylib quotes deletion system, can also include: copy module, for making carbon copies the target
LoadCommand adds new Dylib reference.
Further, the present embodiment also discloses a kind of computer readable storage medium, the computer-readable storage medium
It is stored with Dylib reference in matter and deletes program, program is deleted in the Dylib reference to be executed by one or more processors, with
Realize following method:
Determine Dylib reference to be deleted;It determines in Macho file for saving the target of the Dylib reference to be deleted
LoadCommand;All bytes of the target LoadCommand are set to redundancy bytes, to complete the Dylib to be deleted
The deletion of reference;Wherein the redundancy bytes are in the Macho file for being replicated into the byte of new LoadCommand.
As it can be seen that the present invention determines Dylib reference to be deleted first, is then determined in Macho file and save the reference
The byte of target LoadCommand is set to redundancy bytes by target LoadCommand, although to be not carried out actual delete
Except operation, still, since the byte of target LoadCommand has all been set to redundancy bytes, the reference of script is acted on also not
In the presence of to realize the effect for deleting corresponding logic program segment;And by the corresponding data of target LoadCommand
Resource is available, for being replicated new LoadCommand, to solve the problems, such as the waste of data resource in Macho file.
In a specific embodiment, the redundancy bytes are the byte that all positions are 0.
When the Dylib reference deletion program is executed by one or more processors, it can also realize: described by the mesh
All bytes of mark LoadCommand are set to before redundancy bytes, and all bytes of the target LoadCommand are moved to
The tail portion of all LoadCommand in current Macho file.
When the Dylib reference deletion program is executed by one or more processors, it can also realize: make carbon copies the target
LoadCommand adds new Dylib reference.
Further, the present invention also provides a kind of computer program products, including computer instruction, when the computer refers to
When order is run on computers, the computer is allowed to execute following methods step:
Determine Dylib reference to be deleted;It determines in Macho file for saving the target of the Dylib reference to be deleted
LoadCommand;All bytes of the target LoadCommand are set to redundancy bytes, to complete the Dylib to be deleted
The deletion of reference;Wherein the redundancy bytes are in the Macho file for being replicated into the byte of new LoadCommand.
As it can be seen that the present invention determines Dylib reference to be deleted first, is then determined in Macho file and save the reference
The byte of target LoadCommand is set to redundancy bytes by target LoadCommand, although to be not carried out actual delete
Except operation, still, since the byte of target LoadCommand has all been set to redundancy bytes, the reference of script is acted on also not
In the presence of to realize the effect for deleting corresponding logic program segment;And by the corresponding data of target LoadCommand
Resource is available, for being replicated new LoadCommand, to solve the problems, such as the waste of data resource in Macho file.
In a specific embodiment, the redundancy bytes are the byte that all positions are 0.
In the present embodiment, when the computer instruction is run on computers, so that the computer can specifically be held
Row following steps: before all bytes by the target LoadCommand are set to redundancy bytes, by the target
All bytes of LoadCommand are moved to the tail portion of all LoadCommand in current Macho file.
In the present embodiment, when the computer instruction is run on computers, so that the computer can specifically be held
Row following steps: it makes carbon copies the target LoadCommand and adds new Dylib reference.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real
It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.
The computer program product includes one or more computer instructions.Load and execute on computers the meter
When calculation machine program instruction, entirely or partly generate according to process or function described in the embodiment of the present invention.The computer can
To be general purpose computer, special purpose computer, computer network or other programmable devices.The computer instruction can be deposited
Storage in a computer-readable storage medium, or from a computer readable storage medium to another computer readable storage medium
Transmission, for example, the computer instruction can pass through wired (example from a web-site, computer, server or data center
Such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (such as infrared, wireless, microwave) mode to another website
Website, computer, server or data center are transmitted.The computer readable storage medium can be computer and can deposit
Any usable medium of storage either includes that the data storages such as one or more usable mediums integrated server, data center are set
It is standby.The usable medium can be magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or partly lead
Body medium (such as solid state hard disk Solid State Disk (SSD)) etc..
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with
It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit
It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components
It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or
The mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of device or unit
It closes or communicates to connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product
When, it can store in a computer readable storage medium.Based on this understanding, the technical solution of the application is substantially
The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words
It embodies, which is stored in a storage medium, including some instructions are used so that a computer
Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the application
Portion or part steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only
Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey
The medium of sequence code.
It should be noted that the serial number of the above embodiments of the invention is only for description, do not represent the advantages or disadvantages of the embodiments.And
The terms "include", "comprise" herein or any other variant thereof is intended to cover non-exclusive inclusion, so that packet
Process, device, article or the method for including a series of elements not only include those elements, but also including being not explicitly listed
Other element, or further include for this process, device, article or the intrinsic element of method.Do not limiting more
In the case where, the element that is limited by sentence "including a ...", it is not excluded that including process, device, the article of the element
Or there is also other identical elements in method.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair
Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills
Art field, is included within the scope of the present invention.
Claims (10)
1. a kind of Dylib quotes delet method, which is characterized in that the described method includes:
Determine Dylib reference to be deleted;
It determines in Macho file for saving the target LoadCommand of the Dylib reference to be deleted;
All bytes of the target LoadCommand are set to redundancy bytes, to complete deleting for the Dylib reference to be deleted
It removes;Wherein the redundancy bytes are in the Macho file for being replicated into the byte of new LoadCommand.
2. the method according to claim 1, wherein the redundancy bytes are the byte that all positions are 0.
3. the method according to claim 1, wherein all bytes by the target LoadCommand
It is set to before redundancy bytes, further includes:
All bytes of the target LoadCommand are moved to the tail of all LoadCommand in current Macho file
Portion.
4. the method according to claim 1, wherein all bytes by the target LoadCommand
It is set to after redundancy bytes, further includes:
It makes carbon copies the target LoadCommand and adds new Dylib reference.
5. device is deleted in a kind of Dylib reference, which is characterized in that described device includes memory and processor, the memory
On be stored with the Dylib reference that can be run on the processor and delete program, Dylib reference deletes program by the place
Reason device realizes following method when executing:
Determine Dylib reference to be deleted;
It determines in Macho file for saving the target LoadCommand of the Dylib reference to be deleted;
All bytes of the target LoadCommand are set to redundancy bytes, to complete deleting for the Dylib reference to be deleted
It removes;Wherein the redundancy bytes are in the Macho file for being replicated into the byte of new LoadCommand.
6. device according to claim 5, which is characterized in that the redundancy bytes are the byte that all positions are 0.
7. device according to claim 5, which is characterized in that the Dylib reference is deleted program and held by the processor
When row, also realize:
Before all bytes by the target LoadCommand are set to redundancy bytes, by the target LoadCommand
All bytes be moved to the tail portion of all LoadCommand in current Macho file.
8. device according to claim 5, which is characterized in that the Dylib reference is deleted program and held by the processor
When row, also realize:
It makes carbon copies the target LoadCommand and adds new Dylib reference.
9. a kind of Dylib quotes deletion system, which is characterized in that the system comprises:
First determining module, for determining Dylib reference to be deleted;
Second determining module, for determining in Macho file for saving the target of the Dylib reference to be deleted
LoadCommand;
Removing module, it is described to be deleted to complete for all bytes of the target LoadCommand to be set to redundancy bytes
The deletion of Dylib reference;Wherein the redundancy bytes are in the Macho file for being replicated into new LoadCommand's
Byte.
10. a kind of computer readable storage medium, which is characterized in that be stored with Dylib on the computer readable storage medium
Program is deleted in reference, and program is deleted in the Dylib reference to be executed by one or more processors, to realize such as claim 1
Delet method is quoted to 4 described in any item Dylib.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811612173.3A CN109614254A (en) | 2018-12-27 | 2018-12-27 | A kind of Dylib reference delet method and relevant apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811612173.3A CN109614254A (en) | 2018-12-27 | 2018-12-27 | A kind of Dylib reference delet method and relevant apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109614254A true CN109614254A (en) | 2019-04-12 |
Family
ID=66012880
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811612173.3A Pending CN109614254A (en) | 2018-12-27 | 2018-12-27 | A kind of Dylib reference delet method and relevant apparatus |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109614254A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104424268A (en) * | 2013-08-29 | 2015-03-18 | 国际商业机器公司 | Duplicated data deletion method and device |
CN104484201A (en) * | 2014-12-11 | 2015-04-01 | 北京国双科技有限公司 | Method and device for updating software tool development package of IOS (Internetwork Operating System) equipment |
CN107305495A (en) * | 2016-04-19 | 2017-10-31 | 华为技术有限公司 | Realize the method and terminal of software installation packet function modification |
CN107544811A (en) * | 2017-09-08 | 2018-01-05 | 武汉斗鱼网络科技有限公司 | Ios platform hides method, storage medium, electronic equipment and the system of dylib files |
CN108089893A (en) * | 2017-12-14 | 2018-05-29 | 网易(杭州)网络有限公司 | Definite method, apparatus, terminal device and the storage medium of redundant resource |
-
2018
- 2018-12-27 CN CN201811612173.3A patent/CN109614254A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104424268A (en) * | 2013-08-29 | 2015-03-18 | 国际商业机器公司 | Duplicated data deletion method and device |
CN104484201A (en) * | 2014-12-11 | 2015-04-01 | 北京国双科技有限公司 | Method and device for updating software tool development package of IOS (Internetwork Operating System) equipment |
CN107305495A (en) * | 2016-04-19 | 2017-10-31 | 华为技术有限公司 | Realize the method and terminal of software installation packet function modification |
CN107544811A (en) * | 2017-09-08 | 2018-01-05 | 武汉斗鱼网络科技有限公司 | Ios platform hides method, storage medium, electronic equipment and the system of dylib files |
CN108089893A (en) * | 2017-12-14 | 2018-05-29 | 网易(杭州)网络有限公司 | Definite method, apparatus, terminal device and the storage medium of redundant resource |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020156259A1 (en) | Memory management method and device, mobile terminal, and storage medium | |
CN104699423B (en) | The method and apparatus that drive is bound in linux system | |
US10089105B2 (en) | Systems and methods for bios update optimization | |
CN109522020A (en) | Android system installation kit method for reducing body weight, device, terminal and storage medium | |
CN110825807B (en) | Data interactive conversion method, device, equipment and medium based on artificial intelligence | |
CN104079613A (en) | Method and system for multiple tenants to share application program objects | |
CN109413207A (en) | A kind of file uploading method, system, device and computer readable storage medium | |
CN109491962A (en) | A kind of file directory tree management method and relevant apparatus | |
CN109918203A (en) | Access server memory management optimization method, access server and communication system | |
CN114667506A (en) | Management of multi-physical function non-volatile memory devices | |
CN107844519A (en) | Electronic installation, data base querying scenario generation method and storage medium | |
CN108255989A (en) | Picture storage method, device, terminal device and computer storage media | |
CN107656785A (en) | Basic input output system sets interface display method and terminal device | |
CN108319504A (en) | EMS memory occupation optimization method, device and readable storage medium storing program for executing | |
CN111831320A (en) | Plug-in management method and device, electronic equipment and storage medium | |
CN108108392B (en) | Commodity data management method, commodity data management device, computer equipment and storage medium | |
CN105005491B (en) | The upgrade method and system of a kind of linux kernel and application program | |
CN110222315A (en) | A kind of data statistical approach, system and electronic equipment and storage medium | |
CN109697281A (en) | The online method, apparatus and electronic equipment for merging document | |
CN109857579A (en) | A kind of data processing method and relevant apparatus | |
CN104408209A (en) | File processing method, file processing device and electronic equipment in start-up process of mobile operating system | |
CN109614254A (en) | A kind of Dylib reference delet method and relevant apparatus | |
CN101788946A (en) | Method and device for sintering firmware connected with E2PROM (Electrically Erasable Programmable Read-Only Memory) on CPLD (Complex Programable Logic Device) | |
CN107423047A (en) | Application icon display method and related equipment | |
CN110879701A (en) | Workflow visualization configuration method, server, system and 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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190412 |