elf-patcher

Installation
SKILL.md

ELF Patcher with C

Patch ELF binaries using C code and GNU linker features instead of raw assembly.

Quick Start

  1. Copy templates from assets/ directory
  2. Customize patch_at, patch_size, and external symbols in linkerscript
  3. Write patch logic in C using SECTION(".patch.code.*") attribute
  4. Compile: gcc -c binpatch.c -o binpatch.o -fno-pic -fno-pie -nostdlib
  5. Link: ld -T binpatch.ld binpatch.o -o patch.bin -nostdlib --oformat binary
  6. Apply: dd if=patch.bin of=target bs=1 seek=0xADDR conv=notrunc

Core Technique

This method leverages two GNU Linker features:

Installs
3
GitHub Stars
45
First Seen
May 21, 2026