# static linking

Published articles for static linking.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## C++ libraries linking

DevFeed: [C++ libraries linking](<https://devfeed.tech/articles/c-libraries-linking-22393.md>)

Original publisher: [Read original article](<https://www.red-lang.org/2026/07/c-libraries-linking.html>)

Author: Nenad Rakocevic (noreply@blogger.com)

Published: 2026-07-29T19:07:38Z

Content type: release

Language: en

Sources: [Red](<https://devfeed.tech/sources/red.md>)

Topics: [Red](<https://devfeed.tech/topics/red.md>), [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [toolchain](<https://devfeed.tech/topics/toolchain.md>)

Tags: [build](<https://devfeed.tech/tags/build.md>), [build-tools](<https://devfeed.tech/tags/build-tools.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [clang](<https://devfeed.tech/tags/clang.md>), [compilation](<https://devfeed.tech/tags/compilation.md>), [directx](<https://devfeed.tech/tags/directx.md>), [gcc](<https://devfeed.tech/tags/gcc.md>), [libraries](<https://devfeed.tech/tags/libraries.md>), [linux](<https://devfeed.tech/tags/linux.md>), [macos](<https://devfeed.tech/tags/macos.md>), [msvc](<https://devfeed.tech/tags/msvc.md>), [static-linking](<https://devfeed.tech/tags/static-linking.md>), [toolchain](<https://devfeed.tech/tags/toolchain.md>), [windows](<https://devfeed.tech/tags/windows.md>), [x86](<https://devfeed.tech/tags/x86.md>)

### AI overview

The Red toolchain now supports statically linking C++ libraries, including their runtime, on Windows, Linux, and macOS. It accepts libraries built with MSVC, GCC, or clang through the existing import system and compilation switch, with platform-specific prerequisites and constraints.

### Source excerpt

When we introduced static linking of C libraries, the promise was simple: name a .lib or .a archive in your #import, compile with -s, and ship one self-contained executable, no DLLs riding along, nothing to install on the target machine. There was one big frontier left, and everyone saw it coming: the libraries people want most (vision, GUI, audio, machine learning) are written in C++. A C++ library is a very different animal to link: it brings global constructors, exceptions, RTTI, templates, thread-local storage, and an entire language runtime that expects to be wired up just so. Until now, that was the line where you switched back to DLLs. That line is gone. The Red toolchain now statically links C++ libraries too (their runtime included) on every platform Red targets: Windows, Linux (x86 and ARM), and macOS. The best part: nothing changes. It is the same import system and same compilation switch: red -r -s myapp.red Libraries built with MSVC, GCC or clang are all accepted, in their native object formats. What you need preinstalled ➤ Windows: for C++ libraries (or C code built against Microsoft's static runtime), install the free Visual Studio Build Tools with the "Desktop development with C++" workload. Just one installer, and Red locates everything by itself: no vcvarsall, no PATH, no environment variables. Plain C libraries still need nothing at all and that now extends to C libraries touching COM, DirectX or MediaFoundation: the GUID constants such code references ship inside the toolchain, so a fresh Windows 11 with only red-toolchain executable on it links them! ➤ Linux: the GNU runtime archives from your distribution's gcc packages (libstdc++.a, libgcc.a and friends) placed next to your library. If one is missing, the linker names exactly what it needs. ➤ macOS: nothing beyond the toolchain; the system C++ runtime binds automatically. Some constraints 32-bit libraries for now, until the 64-bit toolchain is ready. The imported surface must be C (extern "C",

## Static linking support

DevFeed: [Static linking support](<https://devfeed.tech/articles/static-linking-support-22392.md>)

Original publisher: [Read original article](<https://www.red-lang.org/2026/06/static-linking-support.html>)

Author: Nenad Rakocevic (noreply@blogger.com)

Published: 2026-06-29T18:39:33Z

Content type: release

Language: en

Sources: [Red](<https://devfeed.tech/sources/red.md>)

Topics: [Red](<https://devfeed.tech/topics/red.md>), [toolchain](<https://devfeed.tech/topics/toolchain.md>), [C](<https://devfeed.tech/topics/c.md>), [parquet](<https://devfeed.tech/topics/parquet.md>), [MSVC](<https://devfeed.tech/topics/msvc.md>), [Claude Code](<https://devfeed.tech/topics/claude-code.md>), [codex](<https://devfeed.tech/topics/codex.md>)

Tags: [agents](<https://devfeed.tech/tags/agents.md>), [c](<https://devfeed.tech/tags/c.md>), [claude-code](<https://devfeed.tech/tags/claude-code.md>), [codex](<https://devfeed.tech/tags/codex.md>), [compression](<https://devfeed.tech/tags/compression.md>), [mod-player](<https://devfeed.tech/tags/mod-player.md>), [msvc](<https://devfeed.tech/tags/msvc.md>), [soundtracker](<https://devfeed.tech/tags/soundtracker.md>), [static-linking](<https://devfeed.tech/tags/static-linking.md>), [toolchain](<https://devfeed.tech/tags/toolchain.md>)

### AI overview

The Red toolchain now supports statically linking C libraries, allowing Red/System programs to be distributed as single self-contained executables. The article explains the linker's handling of object formats, symbols, sections, and relocations, and demonstrates the process with the miniz compression library.

### Source excerpt

We must free ourselves of the hope that the sea will ever rest. We must learn to sail in high winds. -Aristotle Onassis The coding agents revolution is taking the world by storm and we are right in the middle of it. Like most of you, we have experimented with the agent's amazing (and frustrating) capabilities, pondering the role of Red and our vision in that new world. The conclusion is (un)surprisingly clear, Red is still very relevant and will be even more so as we improve it to better work with agents. In the meantime, here are some treats, starting with expanding our toolchain to support static linking of libraries written in C, allowing you to distribute single executables with all dependencies packed inside. This work has been done with the heavy assistance of frontier models and local harnesses (Claude Code and Codex). You might expect that to be a small addition, but a static linker has to read each platform's object format, pull in just the pieces it needs, fold duplicated sections, resolve system symbols and patch relocations by hand, so there was quite a bit of machinery to put together. The reward is the result everyone wants: a single, self-contained binary, with nothing to install beside it. A simple example Let's compress some data without shipping a compression library next to our program. For something concrete we will use miniz, a small, MIT-licensed library that implements the well-known zlib and deflate APIs. It is distributed as a single `miniz.c` / `miniz.h` pair, which makes it especially convenient to compile and link. The first step is to compile miniz into a static library. There are only two things to keep in mind. Red/System currently produces 32-bit code, so the object has to be 32-bit too; and it helps to switch off a couple of compiler extras (C++ exception tables and stack canaries) that would otherwise make the object reference runtime helpers we do not need. On Windows, with MSVC: cl /c /MT /GS- /EHs-c- /GR- miniz.c lib /out:miniz.l

## Call relocation types

DevFeed: [Call relocation types](<https://devfeed.tech/articles/call-relocation-types-31126.md>)

Original publisher: [Read original article](<https://maskray.me/blog/call-relocation-types>)

Published: 2026-02-16T08:00:00Z

Content type: article

Language: en

Sources: [MaskRay](<https://devfeed.tech/sources/maskray.md>)

Topics: [x86](<https://devfeed.tech/topics/x86.md>), [Assembly](<https://devfeed.tech/topics/assembly.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [architectures](<https://devfeed.tech/tags/architectures.md>), [binutils](<https://devfeed.tech/tags/binutils.md>), [function](<https://devfeed.tech/tags/function.md>), [linker](<https://devfeed.tech/tags/linker.md>), [static-linking](<https://devfeed.tech/tags/static-linking.md>), [symbols](<https://devfeed.tech/tags/symbols.md>), [x86](<https://devfeed.tech/tags/x86.md>), [x86-64](<https://devfeed.tech/tags/x86-64.md>)

### AI overview

This technical post explains why some architectures use separate ELF relocation types for direct function calls and tail calls. It contrasts static linking, where a PC-relative relocation can often be reused, with dynamic linking, where calls may use PLT indirection and therefore require relocation types that encode call semantics.

### Source excerpt

Most architectures encode direct branch/call instructions with a PC-relative displacement. This post discusses a specific category of branch relocations: those used for direct function calls and tail calls. Some architectures use two ELF relocation types for a call instruction: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 # i386, x86-64 call foo # R_386_PC32, R_X86_64_PC32 call foo@plt # R_386_PLT32, R_X86_64_PLT32 # m68k bsr.l foo # R_68K_PC32 bsr.l foo@plt # R_68K_PLT32 # s390/s390x brasl %r14, foo # R_390_PC32DBL brasl %r14, foo@plt # R_390_PLT32DBL # sparc call foo, 0 # not PIC: R_SPARC_WDISP30 call foo, 0 # gas -KPIC: R_SPARC_WPLT30

## Blog: Introducing Falco 0.42.0

DevFeed: [Blog: Introducing Falco 0.42.0](<https://devfeed.tech/articles/blog-introducing-falco-0-42-0-32492.md>)

Original publisher: [Read original article](<https://falco.org/blog/falco-0-42-0/>)

Published: 2025-10-22T00:00:00Z

Content type: release

Language: en

Sources: [Falco - Falco](<https://devfeed.tech/sources/falco-falco.md>), [Falco - The Falco blog](<https://devfeed.tech/sources/falco-the-falco-blog.md>)

Topics: [Falco](<https://devfeed.tech/topics/falco.md>), [container](<https://devfeed.tech/topics/container.md>), [Processes](<https://devfeed.tech/topics/processes.md>), [static linking](<https://devfeed.tech/topics/static-linking.md>)

Tags: [bug](<https://devfeed.tech/tags/bug.md>), [bug-fixes](<https://devfeed.tech/tags/bug-fixes.md>), [dry-run](<https://devfeed.tech/tags/dry-run.md>), [falco](<https://devfeed.tech/tags/falco.md>), [features](<https://devfeed.tech/tags/features.md>), [memory-leak](<https://devfeed.tech/tags/memory-leak.md>), [performance](<https://devfeed.tech/tags/performance.md>), [recording](<https://devfeed.tech/tags/recording.md>), [release](<https://devfeed.tech/tags/release.md>), [static-linking](<https://devfeed.tech/tags/static-linking.md>)

### AI overview

Falco 0.42.0 introduces a capture recording feature that generates .scap files when detection rules trigger, including system-call traces for forensic analysis. The release also includes performance improvements, schema validation, configuration changes, and bug fixes.

### Source excerpt

Dear Falco Community, today we are happy to announce the release of Falco 0.42.0! This release brings exciting new capabilities, including the capture feature, significant performance improvements, and important bug fixes that enhance Falco's capabilities. During this release cycle, we merged: 52 PRs on Falco, including 23 release note-worthy changes 110 PRs on Falco libs, including 47 release note-worthy changes 102 PRs on Falco drivers, including 29 release note-worthy changes We upgraded libs to version 0.22.1 and drivers to v9.0.0+driver. Thank you to our maintainers and contributors. This would not have been possible without your support and dedication! To learn everything about the changes, read on! What's new? TL;DR Key features: Capture recording feature; Drop enter initiative for performance; Plugin event schema validation; Thread table auto-purging configuration; Static fields; Key fixes: Fix thread table memory leak when parsing vfork (or equivalent clone/clone3 with CLONE_VFORK) exit from the caller process; Enable handling of multiple actions configured with syscall_event_drops.actions; Disable dry-run restarts when Falco runs with config-watching disabled; Fix abseil-cpp for Alpine build; Fix detection sandbox containers for CRI and containerd runtimes (container plugin); Stability improvements for container plugin and static linking of libgcc/libstdc++ for legacy compatibility; This release also comes with breaking changes that you should be aware of before upgrading. Major features and improvements The 0.42.0 release contains a new capture feature and significant performance improvements. Here is a list of the key new capabilities. Capture recording feature Falco 0.42.0 introduces the new capture recording feature, now available at sandbox maturity. This capability allows Falco to generate .scap files whenever a detection rule is triggered automatically. Each capture contains a detailed trace of system calls around the event, providing forensic-level

## Separation of Concerns in Cross-Compilation

DevFeed: [Separation of Concerns in Cross-Compilation](<https://devfeed.tech/articles/separation-of-concerns-in-cross-compilation-32430.md>)

Original publisher: [Read original article](<https://nixcademy.com/posts/cross-compilation-with-nix/>)

Author: Jacek Galowicz

Published: 2024-01-30T00:00:00Z

Content type: tutorial

Language: en

Sources: [Nixcademy Blog](<https://devfeed.tech/sources/nixcademy-blog.md>)

Topics: [Cross-Compilation](<https://devfeed.tech/topics/cross-compilation.md>), [Nix](<https://devfeed.tech/topics/nix.md>), [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [Dependency management](<https://devfeed.tech/topics/dependency-management.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [Dockerfile](<https://devfeed.tech/topics/dockerfile.md>), [static linking](<https://devfeed.tech/topics/static-linking.md>)

Tags: [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [compilation](<https://devfeed.tech/tags/compilation.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [cross-compilation](<https://devfeed.tech/tags/cross-compilation.md>), [dependency-management](<https://devfeed.tech/tags/dependency-management.md>), [development](<https://devfeed.tech/tags/development.md>), [docker](<https://devfeed.tech/tags/docker.md>), [static-linking](<https://devfeed.tech/tags/static-linking.md>)

### AI overview

This guide explains how Nix applies separation of concerns to cross-compilation in complex C++ projects. It discusses compiler selection, dependency management, external libraries, distribution, Docker-based workflows, and static linking.

### Source excerpt

Master cross-compilation in complex C++ projects with Nix. Simplify dependency management, boost development speed, and reduce costs with this guide!

## Insomnihack22: Reversing a flawed ECC rng-as-a-service Go Server

DevFeed: [Insomnihack22: Reversing a flawed ECC rng-as-a-service Go Server](<https://devfeed.tech/articles/insomnihack22-reversing-a-flawed-ecc-rng-as-a-service-go-server-39681.md>)

Original publisher: [Read original article](<https://mahaloz.re/2022/02/07/Insomnihack22-go-rev.html>)

Published: 2022-02-07T00:00:00Z

Content type: tutorial

Language: en

Sources: [mahaloz.re](<https://devfeed.tech/sources/mahaloz-re.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [Randomizer](<https://devfeed.tech/topics/randomizer.md>), [servers](<https://devfeed.tech/topics/servers.md>), [HTTP](<https://devfeed.tech/topics/http.md>), [debugging](<https://devfeed.tech/topics/debugging.md>)

Tags: [crypto](<https://devfeed.tech/tags/crypto.md>), [ctf](<https://devfeed.tech/tags/ctf.md>), [ecc](<https://devfeed.tech/tags/ecc.md>), [game-hacking](<https://devfeed.tech/tags/game-hacking.md>), [go](<https://devfeed.tech/tags/go.md>), [ida](<https://devfeed.tech/tags/ida.md>), [reversing](<https://devfeed.tech/tags/reversing.md>), [server](<https://devfeed.tech/tags/server.md>), [static-linking](<https://devfeed.tech/tags/static-linking.md>)

### AI overview

This write-up explains how to reverse a Go binary from the Insomnihack Teaser 2022 Nobus101 challenge. The binary provides an RNG service using a flawed P-256 elliptic-curve construction with reversible parameters, and the solution applies ideas from the Dual EC cryptography paper.

### Source excerpt

Reversing a Go binary to find it generates flawed RNG from a P256 Elliptic Curve chosen with a reversible P and Q for number generation. Solution based on the Dual EC crypto paper.