# US 2023/0409313 A1 · On-the-fly linker targeting

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

- Number: US 2023/0409313 A1
- Document ID: US20230409313A1
- Status: Published application
- Kind: A1
- Application number: 18/211,801
- Filed: 2023-06-20
- Published: 2023-12-21
- Earliest claimed: 2022-06-20
- Assignees: Red Balloon Security, Inc.
- Applicants: Red Balloon Security, Inc.
- Inventors: Andrés Hernández; Joel Clarence Cretan; Anastasis Keliris; Wyatt Gerard Ford; Ang Cui
- Web page: https://patentgrep.com/patent/US20230409313A1

## CPC

- G06F 8/658: Incremental updates; Differential updates
- G06F 8/54: Link editing before load time
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Systems and methods are provided for programmatically generating programs that control software linkers to place new executable binary code and/or data patches in existing, executable binaries, which may be fully-linked. Examples disclosed herein include obtaining a first executable; obtaining target information that identifies unused space in the first executable; obtaining one or more routines; generating a linker control program based on the target information and the one or more routines; linking, by the linker control program, the one or more routines into one or more second executables; and patching the first executable with the one or more second executables.

## Claims

### Claim 1

A method comprising:
obtaining a first executable;
obtaining target information that identifies unused space in the first executable;
obtaining one or more routines;
generating a linker control program based on the target information and the one or more routines;
linking, by the linker control program, the one or more routines into one or more second executables; and
patching the first executable with the one or more second executables.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
obtaining symbol location information that identifies one or more symbols in the first executable; and
generating the linker control program based on the symbol location information, the target information, and the one or more routines.

### Claim 3 (depends on 1)

The method of claim 1, wherein linking the one or more routines comprises:
determining size and destination information for the one or more second executables.

### Claim 4 (depends on 3)

The method of claim 3, wherein patching the first executable with the one or more second executables comprises:
adding the one or more second executables to the first executable according to the determined size and destination information for the one or more second executables.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
obtaining second source code; and
compiling the second source code into the one or more routines,
wherein the first executable is based on first source code.

### Claim 6 (depends on 5)

The method of claim 5, wherein obtaining the first executable comprises:
obtaining the first source code; and
compiling the first source code.

### Claim 7 (depends on 5)

The method of claim 5, wherein obtaining the second executable comprises:
compiling the second source code.

### Claim 8 (depends on 1)

The method of claim 1, wherein the identified unused space comprises at least one of:
free space comprising no code or data; and
unused space comprising at least one of unused code and unused data.

### Claim 9 (depends on 1)

The method of claim 1, further comprising:
determining whether the identified unused space in the first executable is sufficient to accommodate the one or more second executables; and
responsive to determining the identified unused space in the first executable is not sufficient to accommodate the one or more second executables, creating new space in the first executable.

### Claim 10

A system comprising:
memory configured to store instructions; and
one or more processors coupled to the memory and configured to execute the instructions to:
obtain a first executable;
obtain target information that identifies unused space in the first executable;
obtain one or more routines;
generate a linker control program based on the target information and the one or more routines;
link, by the linker control program, the one or more routines into one or more second executables; and
patch the first executable with the one or more second executables.

### Claim 11 (depends on 10)

The system of claim 10, wherein the one or more processors are further configured to:
obtain symbol location information that identifies one or more symbols in the first executable; and
generate the linker control program based on the symbol location information, the target information, and the one or more routines.

### Claim 12 (depends on 10)

The system of claim 10, wherein linking the one or more routines comprise:
determining size and destination information for the one or more second executables.

### Claim 13 (depends on 12)

The system of claim 12, wherein patching the first executable with the one or more second executables comprises:
adding the one or more second executables to the first executable according to the determined size and destination information for the one or more second executables.

### Claim 14 (depends on 10)

The system of claim 10, wherein the first executable is based on first source code, and wherein obtaining the first executable comprises:
obtaining the first source code; and
compiling the first source code.

### Claim 15 (depends on 10)

The system of claim 10, wherein the identified unused space comprises at least one of:
free space comprising no code or data; and
unused space comprising at least one of unused code and unused data.

### Claim 16 (depends on 10)

The system of claim 10, further comprising:
obtaining second source code; and
compiling the second source code into the one or more routines,
wherein obtaining the second executable comprises compiling the second source code.

### Claim 17 (depends on 10)

The system of claim 10, wherein patching the first executable with the one or more second executables comprises:
determine whether the identified unused space in the first executable is sufficient to accommodate the one or more second executables; and
responsive to determining the identified unused space in the first executable is not sufficient to accommodate the one or more second executables, creating new space in the first executable.

### Claim 18

A non-transitory computer-readable storage medium configured with instructions executable by one or more processors to cause the one or more processors to perform operations comprising:
generating a linker control program based on target information and one or more routines, the target information identifies unused space based on a first executable;
linking the one or more routines into one or more second executables according to the linker control program; and
patching the first executable with the one or more second executables.

### Claim 19 (depends on 18)

The non-transitory computer-readable storage medium of claim 18, wherein linking the one or more routines comprises:
determining size and destination information for the one or more second executables.

### Claim 20 (depends on 19)

The non-transitory computer-readable storage medium of claim 19, wherein patching the first executable with the one or more second executables comprises:
adding the one or more second executables to the first executable according to the determined size and destination information for the one or more second executables.
