Courgette Internals

Patch Generation

Patch Generation

Disassemble

Adjust

Encode

bsdiff

Patch Application

Patch Application

Glossary

Adjust: Reassign address indices in the new program to match more closely those from the old.

Assembly program: The output of disassembly. Contains a list of Courgette instructions and an index of branch target addresses.

Assemble: Convert an assembly program back into an object file by evaluating the Courgette instructions and leaving the machine instructions in place.

Courgette instruction: Replaces machine instructions in the program. Courgette instructions replace branches with an index to the target addresses and replace part of the relocation table.

Disassembler: Takes a binary file and produces an assembly program.

Encode: Convert an assembly program into an encoded program by serializing its data structures into byte vectors more appropriate for storage in a file.

Encoded Program: The output of encoding.

Ensemble: A Courgette-style patch containing sections for the list of branch addresses, the encoded program. It supports patching multiple object files at once.

Opcode: The number corresponding to either a machine or Courgette instruction.