# US 2014/0351799 A1 · Binary interface instrumentation

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2014/0351799 A1
- Document ID: US20140351799A1
- Status: Published application
- Kind: A1
- Application number: 13/899,519
- Filed: 2013-05-21
- Published: 2014-11-27
- Earliest claimed: 2013-05-21
- Assignees: Red Hat, Inc.
- Applicants: Red Hat, Inc.
- Inventors: Benjamin De Kosnik; Jason Merrill; Dodji Seketeli
- Web page: https://patentgrep.com/patent/US20140351799A1

## CPC

- G06F 8/41: Compilation
- G06F 8/24: {Object-oriented}
- G06F 8/60: Software deployment
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system and methods for generating metadata based on source code are disclosed. In accordance with one embodiment, a computer system receives a command to compile source code, and in response to the command, generates an executable and a metadata file based on the source code, where the metadata file comprises information pertaining to at least one of a scalar type of the source code, a variable of the source code, or a function of the source code.

## Claims

### Claim 1

A method comprising:
receiving a command to compile source code; and
generating by a computer system, in response to the command, an executable and a metadata file based on the source code;
wherein the metadata file comprises information pertaining to at least one of a scalar type of the source code, a variable of the source code, or a function of the source code.

### Claim 2 (depends on 1)

The method of claim 1 wherein the source code is in an object-oriented programming language, and wherein the metadata file further comprises information pertaining to at least one of a class type of the source code, a class template of the source code, or a function template of the source code.

### Claim 3 (depends on 1)

The method of claim 1 wherein the generating of the executable and the metadata file comprises:
compiling the source code into one or more object files;
generating a first metadata file based on the source code;
generating the executable and a second metadata file based on the one or more object files; and
generating the metadata file based on the first metadata file and the second metadata file.

### Claim 4 (depends on 3)

The method of claim 3 wherein the generating of the executable comprises linking the one or more object files and a shared library, and wherein the generating of the second metadata file comprises:
creating a dump of one or more exported symbols of the shared library, and including the dump in the second metadata file.

### Claim 5 (depends on 3)

The method of claim 3 wherein the generating of the metadata file comprises:
converting a first entry of the second metadata file to a first in-memory representation; and
converting a second entry of the first metadata file that is associated with the first entry to a second in-memory representation.

### Claim 6 (depends on 5)

The method of claim 5 wherein the generating of the metadata file further comprises:
augmenting the second in-memory representation to include one or more additional attributes; and
including the first in-memory representation and the augmented second in-memory representation in the metadata file.

### Claim 7 (depends on 1)

The method of claim 1 further comprising determining whether the source code is compatible with other source code via a comparison of the metadata file with another metadata file that is based on the other source code.

### Claim 8

An apparatus comprising:
a memory to store source code; and
a processor to:
receive a command to compile the source code; and
generate, in response to the command, an executable and a metadata file based on the source code;
wherein the metadata file comprises information pertaining to at least one of a scalar type of the source code, a variable of the source code, or a function of the source code.

### Claim 9 (depends on 8)

The apparatus of claim 8 wherein the source code is in an object-oriented programming language, and wherein the metadata file further comprises information pertaining to at least one of a class type of the source code, a class template of the source code, or a function template of the source code.

### Claim 10 (depends on 8)

The apparatus of claim 8 wherein the generating of the executable and the metadata file comprises:
compiling the source code into one or more object files;
generating a first metadata file based on the source code;
generating an executable and a second metadata file based on the one or more object files; and
generating the metadata file based on the first metadata file and the second metadata file.

### Claim 11 (depends on 10)

The apparatus of claim 10 wherein the generating of the executable comprises a linking process, and wherein the generating of the second metadata file comprises including in the second metadata file a header name of an installed header encountered during the linking process.

### Claim 12 (depends on 10)

The apparatus of claim 10 wherein the generating of the metadata file comprises:
converting a first entry of the second metadata file to a first in-memory representation; and
converting a second entry of the first metadata file that is associated with the first entry to a second in-memory representation.

### Claim 13 (depends on 12)

The apparatus of claim 12 wherein the generating of the metadata file further comprises:
augmenting the second in-memory representation to include one or more additional attributes; and
including the first in-memory representation and the augmented second in-memory representation in the metadata file.

### Claim 14 (depends on 8)

The apparatus of claim 8 further comprising determining whether the source code is compatible with other source code via a comparison of the metadata file with another metadata file that is based on the other source code.

### Claim 15

A non-transitory computer readable storage medium, having instructions stored therein, which when executed, cause a computer system to perform operations comprising:
receiving a command to compile source code; and
generating by the computer system, in response to the command, an executable and a metadata file based on the source code;
wherein the metadata file comprises information pertaining to at least one of a scalar type of the source code, a variable of the source code, or a function of the source code.

### Claim 16 (depends on 15)

The non-transitory computer readable storage medium of claim 15 wherein the source code is in an object-oriented programming language, and wherein the metadata file further comprises information pertaining to at least one of a class type of the source code, a class template of the source code, or a function template of the source code.

### Claim 17 (depends on 15)

The non-transitory computer readable storage medium of claim 15 wherein the generating of the executable and the metadata file comprises:
compiling the source code into one or more object files;
generating a first metadata file based on the source code;
generating the executable and a second metadata file based on the one or more object files; and
generating the metadata file based on the first metadata file and the second metadata file.

### Claim 18 (depends on 17)

The non-transitory computer readable storage medium of claim 17 wherein the generating of the executable comprises linking the one or more object files and a shared library, and wherein the generating of the second metadata file comprises: creating a dump of one or more exported symbols of the shared library, and including the dump in the second metadata file.

### Claim 19 (depends on 17)

The non-transitory computer readable storage medium of claim 17 wherein the generating of the metadata file comprises:
converting a first entry of the second metadata file to a first in-memory representation; and
converting a second entry of the first metadata file that is associated with the first entry to a second in-memory representation.

### Claim 20 (depends on 15)

The non-transitory computer readable storage medium of claim 15 wherein the operations further comprise comparing the metadata file to another metadata file.
