EP3100160A1 - Method for code disambiguation - Google Patents

Method for code disambiguation

Info

Publication number
EP3100160A1
EP3100160A1 EP15706863.6A EP15706863A EP3100160A1 EP 3100160 A1 EP3100160 A1 EP 3100160A1 EP 15706863 A EP15706863 A EP 15706863A EP 3100160 A1 EP3100160 A1 EP 3100160A1
Authority
EP
European Patent Office
Prior art keywords
symbol
disambiguation
renaming
file
dependency
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.)
Withdrawn
Application number
EP15706863.6A
Other languages
German (de)
French (fr)
Inventor
Patrice Martinez
Gaël LALIRE
Landry Stéphane ZENG EYINDANGA
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.)
Bull SA
Original Assignee
Bull SA
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 Bull SA filed Critical Bull SA
Publication of EP3100160A1 publication Critical patent/EP3100160A1/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/54Link editing before load time
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/72Code refactoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code

Definitions

  • the invention relates to a method of disambiguation of code and in particular executable code.
  • Executable code in the context of this application will be understood as any loadable byte sequence for execution by an operating system.
  • ELF executable an Linkable Format, for executable and linkable Format
  • PE Portable Executable, for Portable Executable
  • executable files are also referred to the so-called executable files and so-called libraries, implied executable code.
  • Some applications involve the implementation of a plurality of libraries.
  • Each library exports functions that can be used by other executables or libraries that reference it. These other files are said to depend on the library.
  • Each exported function has a name that identifies it.
  • a file E depends on two libraries libA which exports a function fa and NbB which exports a function fb.
  • the function fa calls a function fc of a version v1 of a library NbC.
  • libA therefore depends on a version v1 of NbC
  • the function fb calls a function fc of a version v2 of NbC.
  • NbB therefore depends on a v2 version of NbC.
  • the program fails and stops with an error message or the program behavior is undefined.
  • Such a refactoring is also a heavy operation since it involves a new validation of all the code that is impacted, that is to say, a recovery of all unit tests and functional to verify the absence of impact on the behavior of the application using the modified code.
  • the invention aims to remedy all or part of the disadvantages of the state of the art identified above, and in particular to provide means for adapting versions of a library without having to access or modify its source code.
  • a configuration file that specifies, symbol renaming instructions.
  • An instruction is used to select one or more symbols in a symbol table and specify, for the symbols, to select a renaming rule.
  • the selection of symbols is, for example, according to their nature (exported or imported) and / or by name.
  • the configuration file contains instructions for renaming dependencies.
  • one aspect of the invention relates to a method of disambiguating an executable code file comprising a table of symbols, characterized in that it comprises the following steps:
  • the method / device according to the invention may have one or more additional characteristics among the following, considered individually or according to the technically possible combinations:
  • the method comprises the following steps:
  • a renaming instruction has at least:
  • a selection criterion of a symbol includes a symbol type code according to whether to select an exported symbol or an imported symbol;
  • a selection criterion is a regular expression type mask applied to the name of a symbol or dependency
  • a derivation rule takes into account version information of the executable code file to be produced.
  • the invention also relates to a digital storage device storing a program executable by a machine and composed of instructions carrying out the method according to a combination of the above-mentioned characteristics.
  • Figure 1 is a schematic view of an executable file
  • FIG 2 an illustration of steps of the method according to the invention.
  • identical or similar elements are identified by identical reference signs throughout the figures.
  • Figure 1 is illustrated, schematically, the structure of an executable file.
  • Figure 1 shows an executable file.
  • Such a file is usually recorded on storage means.
  • Such a file is usually loaded into working memory for the purpose of interpreting its contents by a microprocessor.
  • the use of the term interpretation does not presume the nature of the contents of the file.
  • This is binary code that can be loaded into memory.
  • the file 1 01 executable comprises a zone 1 01 header.
  • the header 1 01 describes the structure of the file.
  • the header 1 01 indicates, via different fields, offsets of different sections of the file 1 01 executable.
  • a particular first field 1 02 of the header 1 01 gives the offset of a section 103 symbol table.
  • An offset is conventionally a relative byte distance at the beginning of the file or at the end of the header.
  • a symbol is a reference to a code or data area in an executable file.
  • a symbol is a way of describing an area to read or write.
  • the table symbol section 103 is usually structured in table, each row of the table corresponding to a symbol.
  • a row has at least three columns:
  • the name of the symbol is used as input of the symbol table, that is to say as identifier of the symbol when executing the executable file 01, or when using the file 01 01 executable for editing links in an executable code production process.
  • the type specifies whether the symbol is imported or exported. The symbol is exported if it can be used by another executable file than the one containing the symbol table. The symbol is imported if you have to search for the corresponding code or data area in another executable file than the one containing the symbol table.
  • column 1 06 offset of the symbol has an offset if the symbol is exported. If the symbol is imported, then column 1 06 offset includes:
  • the symbol table is also a table of dependencies.
  • a dependency table is, in a simplified manner, an indexed list of executable file names.
  • the knowledge of the offset of the dependency table, via a field of the header 1 01 for example, and the knowledge of an index, via column 1 06 offset of the symbol table, provides access to the name executable file.
  • Figure two shows a step 201 of reading a disambiguation configuration.
  • a disambiguation configuration is saved in a disambiguation file. Any or all of the parameters of the disambiguation configuration file could be provided on the command line.
  • the method according to the invention is implemented by a processing computer 301 comprising a microprocessor 302 connected to storage means 303 via a bus 304.
  • the method according to the invention therefore corresponds to instruction codes recorded on the means 303 storage and designated by a file name.
  • the method according to the invention is therefore invoked via the name of the corresponding file. This name is, for example, entered in a command window, also called console. This name can be followed by one or more parameters.
  • a disambiguation configuration file comprises: An identifier of a file to be processed, as well as a new name for the file resulting from the processing,
  • a renaming instruction is either a symbol or a dependency.
  • a renaming instruction to the following structure:
  • a mask is for example according to one of the following syntaxes for all of the renaming instructions:
  • a file selector type mask with wildcards :
  • a derivation rule is, for example:
  • step 201 the computer 301 loads a 305 disambiguation configuration file. This allows the computer 301 to know:
  • a file 306 to be processed it is a file recorded on the means 303 for storing the computer 301 for processing,
  • step 201 the processing computer 301 proceeds to a loading step 202 of the list of symbols.
  • the table of symbols is also a table of dependencies.
  • the computer 301 accesses the symbol table of the file 306 to be processed via the header of this file.
  • the computer 301 analyzes each symbol to determine if one of the renaming instructions corresponds to the symbol. The analysis is as follows
  • the selection of the symbols to be processed is according to whether they are imported or exported.
  • a rename statement includes, in its structure, a code specifying whether it applies to exported, imported, or both symbols.
  • a derivation instruction of the type is considered:
  • the first renaming parameter provided in the disambiguation configuration file, is, for example, a version number of the processed file.
  • the result file of the processing is a file named according to a version number.
  • this name is filename.version. extension or:
  • filename is the name of the file to be processed
  • - extension is the extension of the file to be processed, if it has one
  • version is the value of the version parameter.
  • the renaming instructions can be integrated into the executable code corresponding to the invention. In this case they are loaded together with the executable code corresponding to the invention.
  • LibC to LibC.v2 by renaming the exported symbols to postfixed by v2, or _v2 or equivalent string taking into account at least the version of the result file from processing - LibA to LibA.vl by renaming symbols imported from LibC by postfixing them in a manner consistent with the renaming performed to obtain LibC.vl and renaming the dependency to LibC in dependence on LibC.vl
  • LibB to LibB.vl by renaming the symbols imported from LibC by post-fixing them in a consistent manner with the renaming done to obtain LibC.v2 and renaming the dependency to LibC in dependence on LibC.v2
  • a digital storage device has been described for storing a program executable by a machine and composed of instructions implementing the method according to the invention as a hard disk, but it is understood that it can be any medium , removable or not. For example it could be a USB key, a CD, DVD or "BlueRay Disc”. This list is not exhaustive.

Abstract

The invention relates to a method for disambiguating an executable code file comprising a symbol table, characterised in that it comprises the following steps: reading a disambiguation configuration comprising at least one symbol-renaming instruction; renaming symbols from a symbol table according to at least one symbol-renaming instruction of the disambiguation configuration; and saving the file with the code disambiguated according to the disambiguation configuration.

Description

Procédé de désambiguïsation de code  Code disambiguation method
DOMAINE TECHNIQUE DE L'INVENTION  TECHNICAL FIELD OF THE INVENTION
[ 0001 ] L'invention se rapporte à un procédé de désambiguïsation de code et en particulier de code exécutable.  The invention relates to a method of disambiguation of code and in particular executable code.
[0002 ] On entendra par code exécutable dans le cadre de la présente demande toutes séquences d'octets chargeables pour exécution par un système d'exploitation. Sont en particulier visés, mais non exclusivement, les formats ELF (Exécutable an Linkable Format, pour Format exécutable et liable), a.out et PE (Portable Exécutable, pour Exécutable Portable). D'une manière générale, sont également visés les fichiers dits exécutables et les fichiers dits bibliothèques, sous-entendu de code exécutable.  Executable code in the context of this application will be understood as any loadable byte sequence for execution by an operating system. In particular, but not exclusively, ELF (executable an Linkable Format, for executable and linkable Format), a.out and PE (Portable Executable, for Portable Executable) formats are targeted. In general, are also referred to the so-called executable files and so-called libraries, implied executable code.
ETAT DE LA TECHNIQUE ANTERIEURE STATE OF THE PRIOR ART
[ 0003 ] Certaines applications impliquent la mise en œuvre d'une pluralité de bibliothèques. Chaque bibliothèque exporte des fonctions utilisables par d'autres exécutables ou bibliothèques qui la référencent. On dit alors que ces autres fichiers dépendent de la bibliothèque. Chaque fonction exportée a un nom qui l'identifie. [0003] Some applications involve the implementation of a plurality of libraries. Each library exports functions that can be used by other executables or libraries that reference it. These other files are said to depend on the library. Each exported function has a name that identifies it.
[ 0004 ] Des problèmes se posent au moins dans les cas suivants : [0004] Problems arise at least in the following cases:
Deux bibliothèques différentes exportent une fonction ayant le même nom,  Two different libraries export a function with the same name,
Un fichier E dépend de deux bibliothèques libA qui exporte une fonction fa et NbB qui exporte une fonction fb. La fonction fa appelle une fonction fc d'une version v1 d'une bibliothèque NbC. libA dépend donc d'une version v1 de NbC, La fonction fb appelle une fonction fc d'une version v2 de NbC. NbB dépend donc d'une version v2 de NbC. Dans ce cas, à l'exécution, lors d'un appel à fa ou fb il y a une ambiguïté sur la version de la fonction fc à charger. Dans ce cas le programme échoue et s'arrête avec un message d'erreur ou le comportement du programme est indéfini.  A file E depends on two libraries libA which exports a function fa and NbB which exports a function fb. The function fa calls a function fc of a version v1 of a library NbC. libA therefore depends on a version v1 of NbC, the function fb calls a function fc of a version v2 of NbC. NbB therefore depends on a v2 version of NbC. In this case, at runtime, during a call to fa or fb there is an ambiguity on the version of the function fc to load. In this case the program fails and stops with an error message or the program behavior is undefined.
[ 0005 ] Dans l'état de la technique lorsqu'un tel problème est détecté, on effectue, si possible, une « refactorisation » de code source. Cela signifie que l'on effectue un nouveau cycle de développement pour résoudre les ambiguïtés de nommage. Dans l'exemple cité il faudrait changer le code source de l'une des versions de la bibliothèque NbC pour y renommer la fonction fc. Cela implique de : In the state of the art when such a problem is detected, it is carried out, if possible, a "refactoring" of source code. This means that one Performs a new development cycle to resolve naming ambiguities. In the example cited, it would be necessary to change the source code of one of the versions of the library NbC to rename the function fc. This involves:
disposer du code source de la bibliothèque, c'est rarement le cas, - créer une autre version, spécifique, de la bibliothèque donc complexifier la gestion du développement de NbC et de E.  to have the source code of the library, this is rarely the case, - to create another specific version of the library, thus complicating the management of the development of NbC and E.
[ 0006] Une telle refactorisation est de plus une opération lourde puisqu'elle implique une nouvelle validation de tous le code qui est impacté, c'est-à-dire une reprise de tous les tests unitaires et ou fonctionnels pour vérifier l'absence d'impact sur le comportement de l'application utilisant le code modifié. Such a refactoring is also a heavy operation since it involves a new validation of all the code that is impacted, that is to say, a recovery of all unit tests and functional to verify the absence of impact on the behavior of the application using the modified code.
[0007 ] Cela représente donc une charge de travail importante et difficilement automatisable.  This represents a significant workload and difficult to automate.
EXPOSE DE L'INVENTION SUMMARY OF THE INVENTION
[ 0008 ] L'invention vise à remédier à tout ou partie des inconvénients de l'état de la technique identifiés ci-dessus, et notamment à proposer des moyens pour permettre d'adapter les versions d'une bibliothèque sans avoir à accéder ni à modifier son code source. The invention aims to remedy all or part of the disadvantages of the state of the art identified above, and in particular to provide means for adapting versions of a library without having to access or modify its source code.
[ 0009] Dans l'invention on utilise un fichier de configuration qui spécifie, des instructions de renommage de symboles. Une instruction permet de sélectionner un ou plusieurs symboles dans une table de symboles et de spécifier, pour les symboles sélectionner une règle de renommage. La sélection des symboles se fait, par exemple, selon leur nature (exporté ou importé) et/ou selon leur nom. De la même manière le fichier de configuration comporte des instructions de renommage des dépendances.  In the invention is used a configuration file that specifies, symbol renaming instructions. An instruction is used to select one or more symbols in a symbol table and specify, for the symbols, to select a renaming rule. The selection of symbols is, for example, according to their nature (exported or imported) and / or by name. In the same way, the configuration file contains instructions for renaming dependencies.
Dans ce dessein, un aspect de l'invention se rapporte à un procédé de désambiguïsation d'un fichier de code exécutable comportant une table des symboles caractérisé en ce qu'il comporte les étapes suivantes :  For this purpose, one aspect of the invention relates to a method of disambiguating an executable code file comprising a table of symbols, characterized in that it comprises the following steps:
lecture d'une configuration de désambiguïsation comportant au moins une instruction de renommage de symbole,  reading a disambiguation configuration including at least one symbol renaming instruction,
renommage de symboles d'une table des symboles selon au moins une instruction de renommage de symbole de la configuration de désambiguïsation. enregistrement du fichier de code désambiguïsé selon la configuration de désambiguïsation. renaming symbols of a symbol table according to at least one symbol renaming instruction of the disambiguation configuration. saving the disambiguated code file according to the disambiguation configuration.
[0010] Outre les caractéristiques principales qui viennent d'être mentionnées dans le paragraphe précédent, le procédé/dispositif selon l'invention peut présenter une ou plusieurs caractéristiques complémentaires parmi les suivantes, considérées individuellement ou selon les combinaisons techniquement possibles: In addition to the main features which have just been mentioned in the preceding paragraph, the method / device according to the invention may have one or more additional characteristics among the following, considered individually or according to the technically possible combinations:
le fichier de code exécutable comportant une table des dépendances, le procédé comporte les étapes suivantes :  the executable code file having a dependency table, the method comprises the following steps:
lecture d'une configuration de désambiguïsation comportant au moins une instruction de renommage de dépendance, renommage de dépendances de la table des dépendances selon au moins une instruction de renommage de dépendance de de la configuration de désambiguïsation ; qu'une instruction de renommage comporte au moins :  reading a disambiguation configuration including at least one dependency renaming instruction, renaming dependency dependencies according to at least one dependency renaming instruction of the disambiguation configuration; a renaming instruction has at least:
un critère de sélection d'un symbole ou d'une dépendance, une règle de dérivation d'un nom dépendant au moins du nom du symbole ;  a criterion for selecting a symbol or a dependency, a derivation rule of a name depending at least on the name of the symbol;
qu'un critère de sélection d'un symbole comporte un code de nature de symbole selon qu'il faut sélectionner un symbole exporté ou un symbole importé ;  that a selection criterion of a symbol includes a symbol type code according to whether to select an exported symbol or an imported symbol;
qu'un critère de sélection est un masque de type expression régulière appliqué au nom d'un symbole ou d'une dépendance ;  a selection criterion is a regular expression type mask applied to the name of a symbol or dependency;
une règle de dérivation prend en compte une information de version du fichier de code exécutable à produire.  a derivation rule takes into account version information of the executable code file to be produced.
L'invention se rapporte également à un dispositif de stockage numérique stockant un programme exécutable par une machine et composé d'instructions réalisant le procédé selon une combinaison des caractéristiques précédemment citées. The invention also relates to a digital storage device storing a program executable by a machine and composed of instructions carrying out the method according to a combination of the above-mentioned characteristics.
BREVE DESCRIPTION DES FIGURES BRIEF DESCRIPTION OF THE FIGURES
[0011] D'autres caractéristiques et avantages de l'invention ressortiront à la lecture de la description qui suit, en référence aux figures annexées, qui illustrent :  Other features and advantages of the invention will emerge on reading the description which follows, with reference to the appended figures, which illustrate:
la figure 1 , une vue schématique d'un fichier exécutable ;  Figure 1 is a schematic view of an executable file;
la figure 2, une illustration d'étapes du procédé selon l'invention. [0012] Pour plus de clarté, les éléments identiques ou similaires sont repérés par des signes de référence identiques sur l'ensemble des figures. Figure 2, an illustration of steps of the method according to the invention. For clarity, identical or similar elements are identified by identical reference signs throughout the figures.
[0013] L'invention sera mieux comprise la lecture de la description qui suit et à l'examen des figures qui l'accompagnent. Celles-ci sont présentées à titre indicatif et nullement limitatif de l'invention. The invention will be better understood by reading the description which follows and examining the figures that accompany it. These are presented as an indication and in no way limitative of the invention.
DESCRIPTION DETAILLEE D'UN MODE DE REALISATION DETAILED DESCRIPTION OF AN EMBODIMENT
[0014] A la figure 1 est illustrée, de manière schématique, la structure d'un fichier exécutable. La figure 1 montre un fichier 1 00 exécutable. Un tel fichier est usuellement enregistré sur des moyens de stockage. Un tel fichier est usuellement chargé en mémoire de travail en vue de l'interprétation de son contenu par un microprocesseur. Ici l'emploi du terme interprétation ne présume aucunement de la nature du contenu du fichier. Il s'agit bien de code binaire chargeable en mémoire.  In Figure 1 is illustrated, schematically, the structure of an executable file. Figure 1 shows an executable file. Such a file is usually recorded on storage means. Such a file is usually loaded into working memory for the purpose of interpreting its contents by a microprocessor. Here the use of the term interpretation does not presume the nature of the contents of the file. This is binary code that can be loaded into memory.
[0015] Le fichier 1 01 exécutable comporte une zone 1 01 entête. L'entête 1 01 décrit la structure du fichier. Entre autre l'entête 1 01 indique, via différents champs, des offsets de différentes sections du fichier 1 01 exécutable. Un particulier un premier champ 1 02 de l'entête 1 01 donne l'offset d'une section 103 table des symboles. Un offset est classiquement une distance en octets relative au début du fichier ou à la fin de l'entête. The file 1 01 executable comprises a zone 1 01 header. The header 1 01 describes the structure of the file. Among others the header 1 01 indicates, via different fields, offsets of different sections of the file 1 01 executable. A particular first field 1 02 of the header 1 01 gives the offset of a section 103 symbol table. An offset is conventionally a relative byte distance at the beginning of the file or at the end of the header.
[0016] Un symbole est une référence à une zone de code ou de donnée dans un fichier exécutable. Un symbole est un moyen de décrire une zone à lire ou à écrire.  A symbol is a reference to a code or data area in an executable file. A symbol is a way of describing an area to read or write.
[0017] La section 103 table des symboles est usuellement structurée en table, chaque ligne de la table correspondant à un symbole. Une ligne comporte au moins trois colonnes :  The table symbol section 103 is usually structured in table, each row of the table corresponding to a symbol. A row has at least three columns:
Une colonne 1 04 nom du symbole,  A column 1 04 name of the symbol,
Une colonne 1 05 type du symbole,  A column 1 05 type of the symbol,
Une colonne 1 06 offset du symbole.  A column 1 06 offset of the symbol.
[0018] Le nom du symbole est utilisé comme entrée de la table des symboles, c'est-à-dire comme identifiant du symbole lors de l'exécution du fichier 1 01 exécutable, ou lors de l'utilisation du fichier 1 01 exécutable pour une édition de liens dans un processus de production de code exécutable. [0019] Le type spécifie si le symbole est importé ou exporté. Le symbole est exporté s'il est utilisable par d'autre fichier exécutable que celui qui comporte la table de symboles. Le symbole est importé s'il faut aller cherche la zone de code ou de donnée correspondante dans un autre fichier exécutable que celui comportant la table des symboles. The name of the symbol is used as input of the symbol table, that is to say as identifier of the symbol when executing the executable file 01, or when using the file 01 01 executable for editing links in an executable code production process. The type specifies whether the symbol is imported or exported. The symbol is exported if it can be used by another executable file than the one containing the symbol table. The symbol is imported if you have to search for the corresponding code or data area in another executable file than the one containing the symbol table.
[0020 ] La colonne 1 06 offset du symbole comporte un offset si le symbole est exporté. Si le symbole est importé, alors la colonne 1 06 offset comporte :  The column 1 06 offset of the symbol has an offset if the symbol is exported. If the symbol is imported, then column 1 06 offset includes:
Soit une indirection vers une ligne d'une table de dépendances Soit un nom d'un fichier exécutable comportant le code ou la donnée du symbole à importer. Dans ce deuxième cas, la table des symboles est également une table des dépendances.  Either an indirection to a row of a dependency table Either a name of an executable file containing the code or the data of the symbol to be imported. In this second case, the symbol table is also a table of dependencies.
[ 0021 ] Une table des dépendances est, d'une manière simplifiée, une liste indexée de noms de fichiers exécutables. La connaissance de l'offset de la table des dépendances, via un champ de l'entête 1 01 par exemple, et la connaissance d'un index, via la colonne 1 06 offset de la table des symboles, permet d'accéder au nom du fichier exécutable. [0021] A dependency table is, in a simplified manner, an indexed list of executable file names. The knowledge of the offset of the dependency table, via a field of the header 1 01 for example, and the knowledge of an index, via column 1 06 offset of the symbol table, provides access to the name executable file.
[0022 ] La figure deux montre une étape 201 de lecture d'une configuration de désambiguïsation. Une configuration de désambiguïsation est enregistrée dans un fichier de désambiguïsation. Tout où partie des paramètres du fichier de configuration de désambiguïsation pourrait être fourni en ligne de commande.  Figure two shows a step 201 of reading a disambiguation configuration. A disambiguation configuration is saved in a disambiguation file. Any or all of the parameters of the disambiguation configuration file could be provided on the command line.
[0023 ] Le procédé selon l'invention est mise en œuvre par un ordinateur 301 de traitement comportant un microprocesseur 302 connecté à des moyens 303 de stockage via un bus 304. Le procédé selon l'invention correspond donc à des codes instructions enregistrés sur les moyens 303 de stockage et désignées par un nom de fichier. Le procédé selon l'invention est donc invoqué via le nom du fichier correspondant. Ce nom est, par exemple, saisie dans une fenêtre de commande, aussi appelé console. Ce nom peut être suivi d'un ou plusieurs paramètres.  The method according to the invention is implemented by a processing computer 301 comprising a microprocessor 302 connected to storage means 303 via a bus 304. The method according to the invention therefore corresponds to instruction codes recorded on the means 303 storage and designated by a file name. The method according to the invention is therefore invoked via the name of the corresponding file. This name is, for example, entered in a command window, also called console. This name can be followed by one or more parameters.
[0024 ] Lorsque l'on prête une action à un microprocesseur ou à un ordinateur, celle-ci est en fait réalisée par le microprocesseur commandé par des codes instructions chargé dans une mémoire de travail.  When lending an action to a microprocessor or a computer, it is actually performed by the microprocessor controlled by instruction codes loaded into a working memory.
[0025 ] Un fichier de configuration de désambiguïsation comporte : Un identifiant d'un fichier à traiter, ainsi qu'un nouveau nom pour le fichier résultant du traitement, [0025] A disambiguation configuration file comprises: An identifier of a file to be processed, as well as a new name for the file resulting from the processing,
Une ou plusieurs instructions de renommage  One or more renaming instructions
Aucun, un ou plusieurs paramètres de renommage.  None, one or more rename settings.
[ 0026] Une instruction de renommage porte soit sur un symbole, soit sur une dépendance. Ainsi une instruction de renommage à la structure suivante : A renaming instruction is either a symbol or a dependency. Thus a renaming instruction to the following structure:
Un code de désignation selon que l'on souhaite renommer un symbole ou une dépendance,  A designation code depending on whether you want to rename a symbol or an addiction,
Un masque de sélection interprété selon le code de désignation A selection mask interpreted according to the designation code
Une règle de dérivation d'un nouveau nom. A rule of derivation of a new name.
[0027 ] Les codes de désignation selon que l'on souhaite renommer un symbole ou une dépendance sont des valeurs arbitraires, par exemple : The designation codes according to whether one wishes to rename a symbol or a dependency are arbitrary values, for example:
1 pour un symbole,  1 for a symbol,
2 pour une dépendance.  2 for an addiction.
[0028 ] Un masque est par exemple selon l'une des syntaxes parmi les suivantes pour l'ensemble des instructions de renommage :  A mask is for example according to one of the following syntaxes for all of the renaming instructions:
Un nom complet d'un symbole, dans ce cas on cherche un symbole dont le nom correspond exactement,  A full name of a symbol, in this case we look for a symbol whose name exactly matches,
Un masque de type SQL, avec les caractères jokers  A mask of type SQL, with wildcards
_ pour un et un seul caractère quelconque  _ for one and only one character
% n'importe quel caractère dans n'importe quel nombre de zéro à aucune limite  % any character in any number from zero to no limit
Un masque de type sélecteur de fichier avec les caractères jokers :  A file selector type mask with wildcards:
? pour un et un seul caractère quelconque  ? for one and only one character
* n'importe quel caractère dans n'importe quel nombre de zéro à aucune limite  * any character in any number from zero to no limit
Une expression régulière.  A regular expression.
[ 0029] Cette liste d'exemples de syntaxe n'est pas limitative. This list of syntax examples is not limiting.
[ 0030 ] Le cas de l'expression régulière est intéressant car il permet d'effectuer des captures de parties de chaîne pouvant servir à la construction d'un nouveau nom pour le symbole. The case of the regular expression is interesting because it makes it possible to capture parts of a chain that can be used to construct a new name for the symbol.
[0031 ] Si l'on souhaite utiliser plusieurs syntaxes de masque de sélection dans un même fichier de configuration de désambiguïsation, alors il faut ajouter une information à la structure de l'instruction de renommage, cette information ajoutée étant un code permettant de spécifier la manière dont le masque doit être interprété. If one wishes to use several selection mask syntaxes in the same disambiguation configuration file, then one must add a information to the structure of the renaming instruction, this added information being a code for specifying the manner in which the mask is to be interpreted.
[ 0032 ] Une règle de dérivation est, par exemple :  A derivation rule is, for example:
Une chaîne compatible avec l'instruction du langage C printf, les autres paramètres de l'instruction printf étant, dans un ordre prédéterminé, le nom du symbole ou de la dépendance, les paramètres de renommage. On a cité une instruction du langage C mais on peut aussi utiliser d'autre langage comme C# et dans ce cas l'instruction String. Format Une chaîne de remplacement dans le cadre de l'utilisation d'une expression régulière. Dans ce cas on cite comme exemple la fonction preg_replace du langage PHP.  A string compatible with the printf C-language statement, the other parameters of the printf instruction being, in a predetermined order, the name of the symbol or dependency, the renaming parameters. We quoted an instruction of the language C but one can also use other language like C # and in this case the instruction String. Format A replacement string in the context of using a regular expression. In this case we cite as an example the preg_replace function of the PHP language.
[ 0033 ] Dans l'étape 201 l'ordinateur 301 charge un fichier 305 de configuration de désambiguïsation. Cela permet à l'ordinateur 301 de connaître : In step 201 the computer 301 loads a 305 disambiguation configuration file. This allows the computer 301 to know:
un fichier 306 à traiter, il s'agit d'un fichier enregistré sur les moyens 303 de stockage de l'ordinateur 301 de traitement,  a file 306 to be processed, it is a file recorded on the means 303 for storing the computer 301 for processing,
Le nom du fichier à produire,  The name of the file to produce,
Des paramètres de renommage,  Rename parameters,
Une liste d'instruction de renommage,  A renaming instruction list,
[ 0034 ] De l'étape 201 , l'ordinateur 301 de traitement passe à une étape 202 de chargement de la liste des symboles. Pour simplifier on se place dans le cas où la table des symboles est aussi une table des dépendances. Dans l'étape 202 de chargement l'ordinateur 301 accède à la table des symboles du fichier 306 à traiter via l'entête de ce fichier. In step 201, the processing computer 301 proceeds to a loading step 202 of the list of symbols. For simplicity we place ourselves in the case where the table of symbols is also a table of dependencies. In the loading step 202, the computer 301 accesses the symbol table of the file 306 to be processed via the header of this file.
[ 0035 ] Une fois la table des symboles chargée, l'ordinateur 301 , dans une étape 203 analyse chaque symbole pour déterminer si une des instructions de renommage correspond au symbole. L'analyse se déroule comme suit  Once the symbol table is loaded, the computer 301, in a step 203 analyzes each symbol to determine if one of the renaming instructions corresponds to the symbol. The analysis is as follows
si il existe une règle de renommage dont le code de désignation vaut 1 et dont le masque de sélection correspond au nom du symbole  if there is a renaming rule whose designation code is 1 and whose selection mask matches the name of the symbol
remplacer le nom du symbole par le résultat de l'application de la règle de dérivation correspondant à la règle  replace the name of the symbol with the result of applying the rule of derivation corresponding to the rule
fin si  end if
si le symbole est exporté si il existe une règle de renommage dont le code de désignation vaut 2 et dont le masque de sélection correspond à la dépendance du symbole if the symbol is exported if there is a renaming rule whose designation code is 2 and whose selection mask corresponds to the dependency of the symbol
remplacer le nom de la dépendance par le résultat de l'application de la règle de dérivation correspondant à la règle  replace the name of the dependency with the result of applying the rule of derivation corresponding to the rule
fin si  end if
fin si  end if
[ 0036] Ces pseudos instructions sont exécutées pour chaque symbole de la table des symboles et, le cas échéant, pour chaque dépendance de la table des dépendances.  These pseudo instructions are executed for each symbol of the symbol table and, where appropriate, for each dependency of the dependency table.
[0037 ] De l'étape 203 d'analyse de chaque symbole l'ordinateur 301 passe à une étape 204 d'enregistrement du fichier modifié selon la configuration de désambiguïsation chargée à l'étape 201 de chargement de la configuration dans un fichier dont le nom a également été chargé à l'étape 201 .  From the analysis step 203 of each symbol the computer 301 proceeds to a step 204 of recording the modified file according to the disambiguation configuration loaded in the step 201 of loading the configuration into a file whose name was also loaded in step 201.
[ 0038 ] Dans une variante de l'invention, la sélection des symboles à traiter se fait selon qu'ils sont importés ou exportés. Dans ce cas, une instruction de renommage comporte, dans sa structure, un code spécifiant si elle s'applique aux symboles exportés, importés ou au deux. In a variant of the invention, the selection of the symbols to be processed is according to whether they are imported or exported. In this case, a rename statement includes, in its structure, a code specifying whether it applies to exported, imported, or both symbols.
[0039] Dans un exemple on considère une instruction de dérivation du type :  In one example, a derivation instruction of the type is considered:
'{0}ν{1 }'  '{0} ν {1}'
[0040 ] Cela signifie, par exemple que le nouveau nom du symbole sera : ancien nom + v + premier paramètre de renommage. Le premier paramètre de renommage, fourni dans le fichier de configuration de désambiguïsation, est, par exemple, un numéro de version du fichier traité.  This means, for example that the new name of the symbol will be: old name + v + first renaming parameter. The first renaming parameter, provided in the disambiguation configuration file, is, for example, a version number of the processed file.
[ 0041 ] Dans une variante intégrée de l'invention on n'utilise qu'une instruction de renommage pour les symboles exportés. Cette règle est de renommer tous les symboles exportés en tenant compte de la version du fichier traité. Cette version est obtenue, au choix et de manière non limitative : In an integrated variant of the invention, only a renaming instruction is used for the exported symbols. This rule is to rename all exported symbols taking into account the version of the processed file. This version is obtained, with the choice and in a nonlimiting way:
Par un paramètre de ligne de commande  By a command line parameter
- Par un fichier de configuration  - By a configuration file
Par analyse de l'entête du fichier traité  By analyzing the header of the processed file
Par analyse du nom du fichier traité qui est alors du type nomFichier.version. extension. Dans cette variante intégrée le fichier résultat du traitement est un fichier nommé selon un numéro de version. Par exemple ce nom est nomFichier.version. extension ou : By analyzing the name of the processed file, which is then of the fileName.version type. extension. In this integrated variant, the result file of the processing is a file named according to a version number. For example, this name is filename.version. extension or:
nomFichier est le nom du fichier à traiter  filename is the name of the file to be processed
- extension est l'extension du fichier à traiter, s'il en a une  - extension is the extension of the file to be processed, if it has one
version est la valeur du paramètre de version.  version is the value of the version parameter.
Si ce nom est le même que le nom du fichier à traiter alors soit le fichier résultant du traitement remplace le fichier d'origine, soit le fichier résultant du traitement est enregistré à un autre emplacement, c'est-à-dire dans un autre répertoire. If this name is the same as the name of the file to be processed then either the resulting file of the process replaces the original file, or the resulting file of the process is saved in another location, ie in another directory.
[ 0042 ] Dans la variante intégrée des instructions de renommage peuvent être intégrées au code exécutable correspondant à l'invention. Dans ce cas elles sont chargées en même temps que le code exécutable correspondant à l'invention. In the integrated variant of the renaming instructions can be integrated into the executable code corresponding to the invention. In this case they are loaded together with the executable code corresponding to the invention.
[ 0043 ] Ainsi si on considère un fichier E qui importe : So if we consider an E file that matters:
une fonction fa d'un fichier LibA qui lui-même importe une fonction add d'une version 1 d'un fichier LibC  a function fa of a LibA file which itself imports an add function of a version 1 of a LibC file
une fonction fb d'un fichier LibB qui lui-même importe une fonction add d'une version 2 du fichier LibC  a function fb of a LibB file which itself imports an add function of a version 2 of the LibC file
Alors on effectue les opérations de désambiguïsation suivante : Then we perform the following disambiguation operations:
LibC vers LibC.vl en renommant les symboles exportés en les post fixant par v1 , ou _v1 ou une chaîne de caractère équivalent prenant en compte au moins la version du fichier résultat du traitement LibC to LibC.vl by renaming the exported symbols to post fixants by v1, or _v1 or equivalent string taking into account at least the version of the result file of the process
LibC vers LibC.v2 en renommant les symboles exportés en les post fixant par v2, ou _v2 ou une chaîne de caractère équivalent prenant en compte au moins la version du fichier résultat du traitement - LibA vers LibA.vl en renommant les symboles importés depuis LibC en les postfixant de manière cohérente avec le renommage effectué pour obtenir LibC.vl et en renommant la dépendance à LibC en dépendance à LibC.vl LibC to LibC.v2 by renaming the exported symbols to postfixed by v2, or _v2 or equivalent string taking into account at least the version of the result file from processing - LibA to LibA.vl by renaming symbols imported from LibC by postfixing them in a manner consistent with the renaming performed to obtain LibC.vl and renaming the dependency to LibC in dependence on LibC.vl
LibB vers LibB.vl en renommant les symboles importés depuis LibC en les post fixant de manière cohérente avec le renommage effectué pour obtenir LibC.v2 et en renommant la dépendance à LibC en dépendance à LibC.v2  LibB to LibB.vl by renaming the symbols imported from LibC by post-fixing them in a consistent manner with the renaming done to obtain LibC.v2 and renaming the dependency to LibC in dependence on LibC.v2
E vers E en renommant : La dépendance LibA en LibA.vl E to E by renaming: The LibA addiction in LibA.vl
La dépendance LibB en LibB.vl  The LibB dependency on LibB.vl
Dans l'exemple illustratif ci-dessus, le fait de changer les noms de LibA et de LibB, et donc de traiter E, est facultatif. Le fait de le décrire participe à l'illustration de l'invention. In the illustrative example above, changing the names of LibA and LibB, and thus processing E, is optional. Describing it is part of the illustration of the invention.
[0044 ] Ainsi du point de vue du fichier E les ambiguïtés liées aux appels à la fonction « add » ont été levées. Les objectifs de l'invention sont donc bien atteints.  Thus from the point of view of the file E ambiguities related to the calls to the function "add" have been removed. The objectives of the invention are therefore well achieved.
[ 0045 ] On a décrit un dispositif de stockage numérique pour stocker un programme exécutable par une machine et composé d'instructions réalisant le procédé selon l'invention comme étant un disque dur mais il est entendu qu'il peut s'agir de tout support, amovible ou non. Par exemple il pourrait s'agir d'une clé USB, d'un CD, DVD ou « BlueRay Disc ». Cette liste n'est pas limitative. A digital storage device has been described for storing a program executable by a machine and composed of instructions implementing the method according to the invention as a hard disk, but it is understood that it can be any medium , removable or not. For example it could be a USB key, a CD, DVD or "BlueRay Disc". This list is not exhaustive.

Claims

REVENDICATIONS
1 . Procédé de désambiguïsation d'un fichier de code exécutable comportant une table des symboles caractérisé en ce qu'il comporte les étapes suivantes : 1. A method of disambiguating an executable code file comprising a table of symbols, characterized in that it comprises the following steps:
- lecture (201 ) d'une configuration de désambiguïsation comportant au moins une instruction de renommage de symbole,  reading (201) a disambiguation configuration comprising at least one symbol renaming instruction,
renommage (202, 203) de symboles d'une table des symboles selon au moins une instruction de renommage de symbole de la configuration de désambiguïsation.  renaming (202, 203) symbols of a symbol table according to at least one symbol renaming instruction of the disambiguation pattern.
- enregistrement (204) du fichier de code désambiguïsé selon la configuration de désambiguïsation  recording (204) of the disambiguated code file according to the disambiguation configuration
2. Procédé de désambiguïsation selon l'une des revendications précédentes, caractérisé en ce que, le fichier de code exécutable comportant une table des dépendances, le procédé comporte les étapes suivantes :  2. Method of disambiguation according to one of the preceding claims, characterized in that, the executable code file having a table of dependencies, the method comprises the following steps:
- lecture d'une configuration de désambiguïsation comportant au moins une instruction de renommage de dépendance,  reading a disambiguation configuration including at least one dependency renaming instruction,
renommage de dépendances de la table des dépendances selon au moins une instruction de renommage de dépendance de de la configuration de désambiguïsation.  renaming dependencies of the dependency table according to at least one dependency renaming instruction of the disambiguation configuration.
3. Procédé de désambiguïsation selon l'une des revendications précédentes, caractérisé en ce qu'une instruction de renommage comporte au moins : 3. Method of disambiguation according to one of the preceding claims, characterized in that a renaming instruction comprises at least:
un critère de sélection d'un symbole ou d'une dépendance,  a criterion for selecting a symbol or a dependency,
une règle de dérivation d'un nom dépendant au moins du nom du symbole.  a derivation rule of a name depending at least on the name of the symbol.
4. Procédé de désambiguïsation selon la revendication 3, caractérisé en ce qu'un critère de sélection d'un symbole comporte un code de nature de symbole selon qu'il faut sélectionner un symbole exporté ou un symbole importé. 4. Method of disambiguation according to claim 3, characterized in that a selection criterion of a symbol comprises a symbol type code according to whether to select an exported symbol or an imported symbol.
5. Procédé de désambiguïsation selon l'une des revendications 3 ou 4 caractérisé en ce qu'un critère de sélection est un masque de type expression régulière appliqué au nom d'un symbole ou d'une dépendance.  5. disambiguation process according to one of claims 3 or 4 characterized in that a selection criterion is a regular expression type mask applied to the name of a symbol or dependency.
6. Procédé de désambiguïsation selon l'une des revendications 3 à 5, caractérisé en ce qu'une règle de dérivation prend en compte une information de version du fichier de code exécutable à produire. 6. Method of disambiguation according to one of claims 3 to 5, characterized in that a derivation rule takes into account a version information of the executable code file to produce.
7. Un dispositif (303) de stockage numérique stockant un programme exécutable par une machine et composé d'instructions réalisant le procédé selon l'une des revendications précédentes. 7. A digital storage device (303) storing a program executable by a machine and consisting of instructions implementing the method according to one of the preceding claims.
EP15706863.6A 2014-01-27 2015-01-27 Method for code disambiguation Withdrawn EP3100160A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
FR1450647A FR3016979B1 (en) 2014-01-27 2014-01-27 CODE DEAMBIGUIZATION METHOD
PCT/FR2015/050183 WO2015110771A1 (en) 2014-01-27 2015-01-27 Method for code disambiguation

Publications (1)

Publication Number Publication Date
EP3100160A1 true EP3100160A1 (en) 2016-12-07

Family

ID=51688129

Family Applications (1)

Application Number Title Priority Date Filing Date
EP15706863.6A Withdrawn EP3100160A1 (en) 2014-01-27 2015-01-27 Method for code disambiguation

Country Status (4)

Country Link
US (1) US10255050B2 (en)
EP (1) EP3100160A1 (en)
FR (1) FR3016979B1 (en)
WO (1) WO2015110771A1 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050114850A1 (en) * 2003-10-29 2005-05-26 Saurabh Chheda Energy-focused re-compilation of executables and hardware mechanisms based on compiler-architecture interaction and compiler-inserted control
US7752613B2 (en) * 2006-12-05 2010-07-06 Intel Corporation Disambiguation in dynamic binary translation

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
None *
See also references of WO2015110771A1 *

Also Published As

Publication number Publication date
US20160350092A1 (en) 2016-12-01
FR3016979A1 (en) 2015-07-31
FR3016979B1 (en) 2017-08-18
US10255050B2 (en) 2019-04-09
WO2015110771A1 (en) 2015-07-30

Similar Documents

Publication Publication Date Title
US9483390B2 (en) Three-dimensional GUI object stores in automation test tools
KR101732764B1 (en) Intelligent code differencing using code clone detection
US8245186B2 (en) Techniques for offering and applying code modifications
US8863108B2 (en) Finding out if software will run on an operating system without installing that software
WO2010145972A1 (en) Software development tool for providing user context information to improve message quality at development time
US8887122B2 (en) Find and track information of interface usage of software libraries by other software
US6714951B2 (en) Continuous journaling of objects within a hierarchical directory tree
EP2453356B1 (en) Method, computer program and device for securing byte code to be run by a virtual machine
US20130055216A1 (en) Application modification portion searching device and application modification portion searching method
WO2015110771A1 (en) Method for code disambiguation
US20190079756A1 (en) Automated application partitioning system
WO2021130420A1 (en) Method and device implementing said method for generating and installing an executable code in the memory of a core of a virtual machine from a hypervisor
WO2010119208A1 (en) Method for assisting in the development or use of a complex system
EP2043017A1 (en) Method of securely running an application
WO2018224747A1 (en) Non-intrusive method of detecting security flaws of a computer program
FR3025036A1 (en) PROCESS FOR AUTOMATICALLY PROCESSING A SOURCE CODE FOR ITS AERONAUTICAL CERTIFICATION; COMPUTER PROGRAM PRODUCT
WO2019180376A1 (en) Method and system for creating an image of an application
Maruyama et al. ChangeMacroRecorder: Accurate Recording of Fine-Grained Textual Changes of Source Code
Finnegan JBoss Weld CDI for Java Platform
FR2976373A1 (en) METHOD FOR DEVELOPING A WEB PORTAL, AN IMPLEMENTING SYSTEM AND COMPUTER PROGRAM PRODUCT THEREFOR
CN113486330A (en) Application program running method, device, equipment and storage medium
CN117331838A (en) Penetration test method and device
EP1960870A1 (en) Method for creating an approximation graph relating to the behaviour of the man-machine interface of an application
EP1280057A1 (en) Method of dynamic customization of an application program
FR2929727A1 (en) Source code modifying method for object-oriented programming language e.g. C, involves creating file, and regenerating source code by eliminating generated file, and creating another file with extended non-reference class

Legal Events

Date Code Title Description
PUAI Public reference made under article 153(3) epc to a published international application that has entered the european phase

Free format text: ORIGINAL CODE: 0009012

STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: REQUEST FOR EXAMINATION WAS MADE

17P Request for examination filed

Effective date: 20160725

AK Designated contracting states

Kind code of ref document: A1

Designated state(s): AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC MK MT NL NO PL PT RO RS SE SI SK SM TR

AX Request for extension of the european patent

Extension state: BA ME

DAX Request for extension of the european patent (deleted)
STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: EXAMINATION IS IN PROGRESS

17Q First examination report despatched

Effective date: 20190408

STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: THE APPLICATION IS DEEMED TO BE WITHDRAWN

18D Application deemed to be withdrawn

Effective date: 20191019