# static linking

Static linking combines a program with its required libraries at link time and incorporates them into a self-contained executable.

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

## PipeLink: Contract-Guided Linking of GPU Kernel Components

DevFeed: [PipeLink: Contract-Guided Linking of GPU Kernel Components](<https://devfeed.tech/articles/pipelink-contract-guided-linking-of-gpu-kernel-components-104166.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2610.37200>)

Author: Jize Guo, Xupeng Miao

Published: 2026-10-28T04:00:00Z

Content type: article

Language: en

Sources: [arXiv: Distributed Computing](<https://devfeed.tech/sources/arxiv-distributed-computing.md>)

Topics: [architecture-components](<https://devfeed.tech/topics/architecture-components.md>), [Hopper](<https://devfeed.tech/topics/hopper.md>), [static linking](<https://devfeed.tech/topics/static-linking.md>)

Tags: [abstract](<https://devfeed.tech/tags/abstract.md>), [activation](<https://devfeed.tech/tags/activation.md>), [architectures](<https://devfeed.tech/tags/architectures.md>), [arxiv](<https://devfeed.tech/tags/arxiv.md>), [attention](<https://devfeed.tech/tags/attention.md>), [backend](<https://devfeed.tech/tags/backend.md>), [blackwell](<https://devfeed.tech/tags/blackwell.md>), [chip](<https://devfeed.tech/tags/chip.md>), [code](<https://devfeed.tech/tags/code.md>), [communication](<https://devfeed.tech/tags/communication.md>), [component](<https://devfeed.tech/tags/component.md>), [components](<https://devfeed.tech/tags/components.md>), [composition](<https://devfeed.tech/tags/composition.md>), [concurrently](<https://devfeed.tech/tags/concurrently.md>), [consumer](<https://devfeed.tech/tags/consumer.md>), [context](<https://devfeed.tech/tags/context.md>), [contracts](<https://devfeed.tech/tags/contracts.md>), [cs-dc](<https://devfeed.tech/tags/cs-dc.md>), [gpu](<https://devfeed.tech/tags/gpu.md>), [kernel](<https://devfeed.tech/tags/kernel.md>), [linking](<https://devfeed.tech/tags/linking.md>)

### AI overview

PipeLink links GPU kernel components compiled independently, using contracts that state each component's requirements and guarantees. It checks compatibility, jointly places components within shared streaming-multiprocessor resources, generates transfers, and relies on the vendor LTO backend to fold the result into constants. Across 51 Hopper and Blackwell configurations, linked kernels ran within 0.2% of kernels compiled as one unit. Reported compositions include a CuTe attention operator in a ThunderKittens decode megakernel that sped decoding by 2.16x, a four-owner MoE training megakernel matching its monolith, and a GEMM + SwiGLU composition running 1.2x faster on Blackwell than cuBLAS with a compiled activation. The supplied excerpt also reports sparse and context-parallel variants outperforming FlexAttention, vLLM, and Transformer Engine.

### Source excerpt

arXiv:2610.37200v1 Announce Type: new Abstract: The fastest machine-learning kernels are compositions of components, such as loaders, matrix-multiply mainloops, epilogues and communication stages, that run concurrently on one GPU streaming multiprocessor and share its on-chip memory, barriers, warps and registers. Because these components hard-code where they sit in this shared space, they cannot be compiled, shipped or replaced on their own: combining components from different sources means forking them by hand or keeping them in separate kernels. We present PipeLink, a contract-guided linker for GPU kernel components. Each component is compiled separately into an LTO object that carries a contract stating what it requires and what it promises; PipeLink checks the contracts against each other, relocates every component by solving one joint placement of the SM's resources, and generates the transfers between them, and the vendor LTO backend folds the result into constants. Across 51 configurations on Hopper and Blackwell GPUs, linked kernels run within 0.2% of the same sources compiled as one unit. Linking makes new compositions practical: a CuTe attention operator inside a ThunderKittens decode megakernel speeds up decoding by 2.16$\times$, a four-owner MoE training megakernel matches the original monolith, one unchanged attention core yields sparse and context-parallel variants that outperform FlexAttention, vLLM and Transformer Engine, and a GEMM + SwiGLU composition whose consumer serves three GPU architectures runs 1.2$\times$ faster on Blackwell than cuBLAS with a compiled activation.

## Lightpanda put Jev in its binary for page triage

DevFeed: [Lightpanda put Jev in its binary for page triage](<https://devfeed.tech/articles/lightpanda-put-jev-in-its-binary-for-page-triage-95744.md>)

Original publisher: [Read original article](<https://jevdaily.com/issues/2026-10-22>)

Author: Jev Daily

Published: 2026-10-22T14:22:18.019331Z

Content type: news

Language: en

Sources: [Jev Daily](<https://devfeed.tech/sources/jev-daily.md>)

Topics: [implementation](<https://devfeed.tech/topics/implementation.md>), [static linking](<https://devfeed.tech/topics/static-linking.md>), [API Business Models](<https://devfeed.tech/topics/api-business-models.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [automation](<https://devfeed.tech/tags/automation.md>), [built-with-it](<https://devfeed.tech/tags/built-with-it.md>), [content](<https://devfeed.tech/tags/content.md>), [cost](<https://devfeed.tech/tags/cost.md>), [demo](<https://devfeed.tech/tags/demo.md>), [diogo-almeida](<https://devfeed.tech/tags/diogo-almeida.md>), [docs](<https://devfeed.tech/tags/docs.md>), [faster](<https://devfeed.tech/tags/faster.md>), [inside](<https://devfeed.tech/tags/inside.md>), [integration](<https://devfeed.tech/tags/integration.md>), [jev](<https://devfeed.tech/tags/jev.md>), [latency](<https://devfeed.tech/tags/latency.md>), [llm](<https://devfeed.tech/tags/llm.md>), [models](<https://devfeed.tech/tags/models.md>), [order](<https://devfeed.tech/tags/order.md>), [pitching](<https://devfeed.tech/tags/pitching.md>), [product](<https://devfeed.tech/tags/product.md>), [questions](<https://devfeed.tech/tags/questions.md>), [real-world](<https://devfeed.tech/tags/real-world.md>), [run](<https://devfeed.tech/tags/run.md>)

### AI overview

Lightpanda embedded Jev in its binary and built judge(), which answers predefined questions to determine whether a page has real content and classify it as an article, listing, product page, or docs. The excerpt reports one call takes about 0.2 seconds; a demo covered 30 sites in roughly 14 seconds. Separately, UiPath added a TypeSafe connector to its Integration Service for workflow decisions. TypeSafe says Jev is about an order of magnitude cheaper and faster than an LLM judge; the excerpt attributes the size of that gain to TypeSafe itself.

### Source excerpt

Lightpanda compiled Jev into the Lightpanda binary and built judge() on it, one call at roughly 0.2s to tell a real article from a cookie wall. Separately...

## simdjson 5.0 is out

DevFeed: [simdjson 5.0 is out](<https://devfeed.tech/articles/simdjson-5-0-is-out-61355.md>)

Original publisher: [Read original article](<https://lemire.me/blog/2026/09/28/simdjson-5-0-is-out/>)

Author: Daniel Lemire

Published: 2026-09-28T12:38:25Z

Content type: release

Language: en

Sources: [Daniel Lemire](<https://devfeed.tech/sources/daniel-lemire.md>)

Topics: [JSON](<https://devfeed.tech/topics/json.md>), [Library](<https://devfeed.tech/topics/library.md>), [static linking](<https://devfeed.tech/topics/static-linking.md>), [Linux Kernel](<https://devfeed.tech/topics/linux-kernel.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>)

Tags: [apache](<https://devfeed.tech/tags/apache.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [c-plus-plus-26](<https://devfeed.tech/tags/c-plus-plus-26.md>), [clickhouse](<https://devfeed.tech/tags/clickhouse.md>), [gcc](<https://devfeed.tech/tags/gcc.md>), [js](<https://devfeed.tech/tags/js.md>), [json](<https://devfeed.tech/tags/json.md>), [ladybird](<https://devfeed.tech/tags/ladybird.md>), [meta](<https://devfeed.tech/tags/meta.md>), [node-js](<https://devfeed.tech/tags/node-js.md>)

### AI overview

simdjson 5.0 adds default key-selector deserialization for reflected C++ structures, improved handling of large integers, JSON text sequences and comma-separated document streams, and options for line-based and threaded parsing. It also includes bug fixes following an audit.

### Source excerpt

The simdjson library is a C++ library to parse and generate JSON. It is used in Node.js, ClickHouse, Meta Velox, StarRocks, Apache Doris, the Ladybird browser and many other systems. We released version 4.0 a year ago, in September 2025. Its headline feature was C++26 static reflection: you could turn a C++ structure into JSON, ... Continue reading simdjson 5.0 is out

## 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: [static linking](<https://devfeed.tech/topics/static-linking.md>), [Red](<https://devfeed.tech/topics/red.md>), [c/c++](<https://devfeed.tech/topics/c-c-plus-plus.md>), [toolchain](<https://devfeed.tech/topics/toolchain.md>), [MSVC](<https://devfeed.tech/topics/msvc.md>), [clang](<https://devfeed.tech/topics/clang.md>), [linker](<https://devfeed.tech/topics/linker.md>)

Tags: [arm](<https://devfeed.tech/tags/arm.md>), [build-tools](<https://devfeed.tech/tags/build-tools.md>), [c](<https://devfeed.tech/tags/c.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [clang](<https://devfeed.tech/tags/clang.md>), [exceptions](<https://devfeed.tech/tags/exceptions.md>), [gcc](<https://devfeed.tech/tags/gcc.md>), [gnu](<https://devfeed.tech/tags/gnu.md>), [libraries](<https://devfeed.tech/tags/libraries.md>), [libstdc-plus-plus](<https://devfeed.tech/tags/libstdc-plus-plus.md>), [linker](<https://devfeed.tech/tags/linker.md>), [linking](<https://devfeed.tech/tags/linking.md>), [linux](<https://devfeed.tech/tags/linux.md>), [macos](<https://devfeed.tech/tags/macos.md>), [msvc](<https://devfeed.tech/tags/msvc.md>), [red](<https://devfeed.tech/tags/red.md>), [runtime](<https://devfeed.tech/tags/runtime.md>), [static-linking](<https://devfeed.tech/tags/static-linking.md>), [templates](<https://devfeed.tech/tags/templates.md>), [toolchain](<https://devfeed.tech/tags/toolchain.md>)

### AI overview

The Red toolchain can now statically link C++ libraries and include their runtime on Windows, Linux (x86 and ARM), and macOS, using the existing import system and compilation switch; it accepts native object formats from MSVC, GCC, and clang. Requirements differ by platform: Windows needs Visual Studio Build Tools with the C++ workload for C++ libraries or code using Microsoft's static runtime; Linux needs GCC runtime archives beside the library; macOS needs no additional runtime setup. The excerpt says imported functions must expose a C interface, so C++ classes or templates need a thin C shim, and exceptions should be caught within exported functions. Link-time-optimized objects are unsupported, and Windows builds should use the static runtime. The stated current constraint is support for 32-bit libraries while the 64-bit toolchain is pending.

### 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: [static linking](<https://devfeed.tech/topics/static-linking.md>), [linker](<https://devfeed.tech/topics/linker.md>), [toolchain](<https://devfeed.tech/topics/toolchain.md>), [Red](<https://devfeed.tech/topics/red.md>), [Claude Code](<https://devfeed.tech/topics/claude-code.md>)

Tags: [agents](<https://devfeed.tech/tags/agents.md>), [c](<https://devfeed.tech/tags/c.md>), [coding-agents](<https://devfeed.tech/tags/coding-agents.md>), [linker](<https://devfeed.tech/tags/linker.md>), [mod-player](<https://devfeed.tech/tags/mod-player.md>), [soundtracker](<https://devfeed.tech/tags/soundtracker.md>), [static-linking](<https://devfeed.tech/tags/static-linking.md>)

### AI overview

Red/System's toolchain now supports statically linking C libraries into a single self-contained executable. The linker reads platform object formats, selects needed sections, resolves system symbols, and applies relocations. In the example, miniz is compiled as a static library; its object must match Red/System's current 32-bit output, and disabling C++ exception tables and stack canaries avoids runtime helper references. The imported library name can stay extensionless: by default it resolves to the platform's shared library, while a static-link switch makes it resolve to the static library so its code is included in the executable. The excerpt shows the MSVC build beginning but omits the full commands and later platform details.

### 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

## Simdutf Can Now Be Used Without libc++ or libc++abi

DevFeed: [Simdutf Can Now Be Used Without libc++ or libc++abi](<https://devfeed.tech/articles/simdutf-can-now-be-used-without-libc-or-libc-abi-51452.md>)

Original publisher: [Read original article](<https://mitchellh.com/writing/simdutf-no-libcxx>)

Published: 2026-04-15T00:00:00Z

Content type: article

Language: en

Sources: [Mitchell Hashimoto](<https://devfeed.tech/sources/mitchell-hashimoto.md>)

Topics: [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [Cross-Compilation](<https://devfeed.tech/topics/cross-compilation.md>), [static linking](<https://devfeed.tech/topics/static-linking.md>), [WebAssembly](<https://devfeed.tech/topics/web-assembly.md>)

Tags: [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [compilation](<https://devfeed.tech/tags/compilation.md>), [cross-compilation](<https://devfeed.tech/tags/cross-compilation.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [static-linking](<https://devfeed.tech/tags/static-linking.md>)

### AI overview

The article explains how simdutf was made usable without libc++ or libc++abi, allowing Ghostty to remove those dependencies. It discusses portability, cross-compilation, binary size, static linking, and custom replacements for required C++ standard-library types.

### Source excerpt

Simdutf Can Now Be Used Without libc++ or libc++abi As of this PR, simdutf can be used without libc++ or libc++abi1. Simdutf was the final remaining libc++ dependency in libghostty-vt2. After updating Ghostty to use this new simdutf build, we were able to remove libc++ and libc++abi completely from our dependencies.

## 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](<https://devfeed.tech/sources/falco-falco.md>)

Topics: [Falco](<https://devfeed.tech/topics/falco.md>), [container](<https://devfeed.tech/topics/container.md>), [Process](<https://devfeed.tech/topics/process.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!

## Auto linking with Mach-O binaries

DevFeed: [Auto linking with Mach-O binaries](<https://devfeed.tech/articles/auto-linking-with-mach-o-binaries-25407.md>)

Original publisher: [Read original article](<https://smileykeith.com/2022/02/23/lc-linker-option/>)

Author: Keith Smiley

Published: 2022-02-24T02:00:00Z

Content type: article

Language: en

Sources: [Keith Smiley](<https://devfeed.tech/sources/keith-smiley.md>)

Topics: [static linking](<https://devfeed.tech/topics/static-linking.md>)

Tags: [asm](<https://devfeed.tech/tags/asm.md>), [assembly](<https://devfeed.tech/tags/assembly.md>), [bazel](<https://devfeed.tech/tags/bazel.md>), [binaries](<https://devfeed.tech/tags/binaries.md>), [build-system](<https://devfeed.tech/tags/build-system.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [clang](<https://devfeed.tech/tags/clang.md>), [cmake](<https://devfeed.tech/tags/cmake.md>), [compile](<https://devfeed.tech/tags/compile.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [foundation](<https://devfeed.tech/tags/foundation.md>), [framework](<https://devfeed.tech/tags/framework.md>), [libraries](<https://devfeed.tech/tags/libraries.md>), [linker](<https://devfeed.tech/tags/linker.md>), [linking](<https://devfeed.tech/tags/linking.md>), [maps](<https://devfeed.tech/tags/maps.md>), [module](<https://devfeed.tech/tags/module.md>), [object](<https://devfeed.tech/tags/object.md>), [objective-c](<https://devfeed.tech/tags/objective-c.md>), [succeed](<https://devfeed.tech/tags/succeed.md>)

### AI overview

Mach-O auto linking embeds linker options in object files at compile time, reducing the need to repeat dependency flags at link time. In the Objective-C example, compiling with Clang's `-fmodules` records `Foundation` in an `LC_LINKER_OPTION`, so the later link succeeds without an explicit framework flag; without modules, linking fails until `-framework Foundation` is added. Module maps can also declare libraries and frameworks with `link` directives. Swift object files can record required Swift libraries, including implementation dependencies. When auto linking is unavailable, the excerpt shows Clang and Swift compiler flags for adding linker options, Clang's `--dependent-lib` for library dependencies, and assembly `.linker_option` directives. The compiler flag approach is described as unsuitable for framework options requiring multiple arguments; assembly directives handle spaces and are shown adding both a library and a framework.

### Source excerpt

Auto linking is a feature that embeds information in your binaries' at compile time which is then used at link time to automatically link your dependencies. This allows you to reduce the duplication of flags between the different phases of your (or your consumers') builds. For example, with this Objective-C file: #include <Foundation/Foundation.h> int main() { NSLog(@"Hello, World!"); return 1; } Compiled with: $ clang -fmodules -c foo.m -o foo.o You can then inspect the options added for use at link time: $ otool -l foo.o | grep LC_LINKER_OPTION -A3 cmd LC_LINKER_OPTION cmdsize 40 count 2 string #1 -framework string #2 Foundation ... Now when linking this binary you don't have to pass any extra flags to the linker to make sure you link Foundation: $ ld foo.o -syslibroot `xcrun --show-sdk-path` To compare, if you compile the binary without -fmodules1: $ clang -c foo.m -o foo.o You don't get any LC_LINKER_OPTIONs. Then when linking the binary with the same command as before, it fails with these errors: $ ld foo.o -syslibroot `xcrun --show-sdk-path` Undefined symbols for architecture arm64: "_NSLog", referenced from: _main in foo.o "___CFConstantStringClassReference", referenced from: CFString in foo.o ld: symbol(s) not found for architecture arm64 To make it succeed you must explicitly link Foundation through an argument to your linker invocation: $ ld foo.o -syslibroot `xcrun --show-sdk-path` -framework Foundation Auto linking is also applied when using module maps that use the link directive. For example with this module map file: // module.modulemap module foo { link "foo" link framework "Foundation" } That you include with in this source file: @import foo; int main() { return 1; } And compile (with an include path to the module.modulemap file): $ clang -fmodules -c foo.m -o foo.o -I. The produced object depends on foo and Foundation. This can be useful for handwriting module map files for prebuilt libraries, and for quite a few other cases. You can read about thi

## What we've been reading in January (2022)

DevFeed: [What we've been reading in January (2022)](<https://devfeed.tech/articles/what-we-ve-been-reading-in-january-2022-47280.md>)

Original publisher: [Read original article](<https://interrupt.memfault.com/blog/january-2022-roundup>)

Author: Tyler Hoffman

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

Content type: article

Language: en

Sources: [Interrupt](<https://devfeed.tech/sources/interrupt.md>)

Topics: [Embedded Software Dev](<https://devfeed.tech/topics/embedded-software-dev.md>), [software-development](<https://devfeed.tech/topics/software-development.md>), [linker](<https://devfeed.tech/topics/linker.md>), [static linking](<https://devfeed.tech/topics/static-linking.md>), [gdb](<https://devfeed.tech/topics/gdb.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [fpga](<https://devfeed.tech/topics/fpga.md>), [WebAssembly](<https://devfeed.tech/topics/web-assembly.md>), [GitHub Actions](<https://devfeed.tech/topics/github-actions.md>), [Unit testing](<https://devfeed.tech/topics/unit-testing.md>), [Linux Kernel](<https://devfeed.tech/topics/linux-kernel.md>), [build times](<https://devfeed.tech/topics/build-times.md>)

Tags: [2022](<https://devfeed.tech/tags/2022.md>), [arduino](<https://devfeed.tech/tags/arduino.md>), [articles](<https://devfeed.tech/tags/articles.md>), [build-times](<https://devfeed.tech/tags/build-times.md>), [debug](<https://devfeed.tech/tags/debug.md>), [debugger](<https://devfeed.tech/tags/debugger.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [firmware](<https://devfeed.tech/tags/firmware.md>), [fpga](<https://devfeed.tech/tags/fpga.md>), [github-actions](<https://devfeed.tech/tags/github-actions.md>), [linker](<https://devfeed.tech/tags/linker.md>), [linux](<https://devfeed.tech/tags/linux.md>), [linux-kernel](<https://devfeed.tech/tags/linux-kernel.md>), [raspberry-pi](<https://devfeed.tech/tags/raspberry-pi.md>)

### AI overview

A January 2022 roundup of articles, videos, tools, and a job site relevant to embedded and firmware engineers. It covers static linking and linker behavior, WebAssembly, embedded Linux, Raspberry Pi storage performance, Linux on microcontrollers, embedded controllers, Linux kernel header build times, bootloader version reporting, GDB debugging for Arduino projects, and firmware unit testing with Ceedling and GitHub Actions CI.

### Source excerpt

Here are the articles, videos, and tools that we've been excited about this January. Continue reading...

## Automatic Object Linkage, with Include Graphs

DevFeed: [Automatic Object Linkage, with Include Graphs](<https://devfeed.tech/articles/automatic-object-linkage-with-include-graphs-28618.md>)

Original publisher: [Read original article](<https://upcoder.com/19/automatic-object-linkage-with-include-graphs>)

Published: 2018-05-31T13:33:00Z

Content type: article

Language: en

Sources: [Thomas Young](<https://devfeed.tech/sources/thomas-young.md>)

Topics: [Compilers and Linkers](<https://devfeed.tech/topics/compilers-and-linkers.md>), [linker](<https://devfeed.tech/topics/linker.md>), [static linking](<https://devfeed.tech/topics/static-linking.md>), [Software Testing](<https://devfeed.tech/topics/software-testing.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>), [test impact analysis](<https://devfeed.tech/topics/test-impact-analysis.md>)

Tags: [3d](<https://devfeed.tech/tags/3d.md>), [application](<https://devfeed.tech/tags/application.md>), [automatic](<https://devfeed.tech/tags/automatic.md>), [automatically](<https://devfeed.tech/tags/automatically.md>), [based](<https://devfeed.tech/tags/based.md>), [build](<https://devfeed.tech/tags/build.md>), [c](<https://devfeed.tech/tags/c.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [code-sharing](<https://devfeed.tech/tags/code-sharing.md>), [compilation](<https://devfeed.tech/tags/compilation.md>), [content](<https://devfeed.tech/tags/content.md>), [custom](<https://devfeed.tech/tags/custom.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [dll](<https://devfeed.tech/tags/dll.md>), [graphs](<https://devfeed.tech/tags/graphs.md>), [include](<https://devfeed.tech/tags/include.md>), [libraries](<https://devfeed.tech/tags/libraries.md>), [modular](<https://devfeed.tech/tags/modular.md>), [multiple](<https://devfeed.tech/tags/multiple.md>), [object](<https://devfeed.tech/tags/object.md>)

### AI overview

The article describes a custom build system that derives each target's link inputs from include relationships: including a header with a matching source file implies a dependency on that source, and analysis expands recursively from one or more root files. This can share object files across targets and produce leaner application and test builds than broad static library groupings, reducing manual project setup and recompilation. The approach assumes disciplined header/source pairs and headers that reflect actual use; bypassed headers can cause missing links, while headers with mostly inline code can pull in unnecessary objects. PathEngine disallows conditional include directives so headers can be analyzed once, but adopting the method required code changes and a custom build system. IDE integration trades off features: external build projects support dynamic targets and shared objects but can lose IntelliSense, while generated projects retain IDE features but do not update dynamically and do not share objects.

### Source excerpt

In this post I describe an alternative approach to sharing source code elements between multiple build targets. It's based on a custom build process I implemented at PathEngine for our C and C++ code-base (but the core ideas could also be relevant to other languages with compilation to object files). We'll need to enforce some constraints on the way the source code is set up, notably with regards to header file organisation, but can then automatically determine what to include in the link operation for each build target, based on a graph of include relationships extracted from the source files. The resulting dynamic, fine grained, object-file centric approach to code sharing avoids the need for problematic static library decomposition, and the associated 'false dependencies'. Motivation We need to work with a bunch of different build targets, at PathEngine. There's a run-time pathfinding dll, for example, but also a 3D content processing dll, a 3D testbed application, and so on, with a lot of source code shared between these different targets. The code was originally split into a set of (internal) static libraries, for this purpose. based on things like theme (e.g. 'Geometry.lib') or application layer ('PathEngine_Core.lib', 'PathEngine_Interface.lib'). Different targets could then share common source code by sharing these static libraries. This worked, as far as it goes, but something didn't feel right. The libraries weren't particularly modular, for one thing, and just felt like big old bags of object files that didn't really reflect the actual structure of the underlying code. A bigger problem was that, for any kind of prototyping work, I ended up having to link in a big chunk of the PathEngine source code, even where only some small part of this was really required. Unit testing was also difficult to setup, for a similar reason. Since throwing out the static libraries and switching to an alternative approach (as described in this post), prototyping and unit test

## Static Libs Do Not Modular Make

DevFeed: [Static Libs Do Not Modular Make](<https://devfeed.tech/articles/static-libs-do-not-modular-make-28617.md>)

Original publisher: [Read original article](<https://upcoder.com/18/static-libs-do-not-modular-make>)

Published: 2017-09-23T13:12:00Z

Content type: opinion

Language: en

Sources: [Thomas Young](<https://devfeed.tech/sources/thomas-young.md>)

Topics: [Code Modularity](<https://devfeed.tech/topics/code-modularity.md>), [static linking](<https://devfeed.tech/topics/static-linking.md>), [modules](<https://devfeed.tech/topics/modules.md>), [project layout](<https://devfeed.tech/topics/project-layout.md>), [Compilers and Linkers](<https://devfeed.tech/topics/compilers-and-linkers.md>), [Library](<https://devfeed.tech/topics/library.md>)

Tags: [build-tools](<https://devfeed.tech/tags/build-tools.md>), [c-c-plus-plus](<https://devfeed.tech/tags/c-c-plus-plus.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [interface](<https://devfeed.tech/tags/interface.md>), [modular](<https://devfeed.tech/tags/modular.md>), [module](<https://devfeed.tech/tags/module.md>), [source-code](<https://devfeed.tech/tags/source-code.md>), [static](<https://devfeed.tech/tags/static.md>)

### AI overview

The article argues that splitting existing C/C++ source files into internal static libraries rarely creates meaningful modularity by itself. A static library is essentially an archive of object files: bundling them changes how they reach the linker, but does not hide their symbols or establish better interfaces. The build step hides little beyond the object-file list, and broad groupings such as files sharing a theme can force dependent projects to build, distribute, and maintain files they do not use. The author describes this approach as a hindrance in PathEngine, whose structure was later expressed through directories and direct object-file dependencies. Static libraries can still help with concrete build concerns such as handling many files or caching symbol indexes. Shared libraries also need deliberate interface and visibility work to provide information hiding; on Linux, the text cites `-fvisibility=hidden` as an option.

### Source excerpt

A cautionary tale about statically-linked libraries, as generated by C/C++ build tools. As a project accumulates features, and complexity, it gets harder to understand exactly what's going on, and to find your way around the source code. You need to find some way to organise the code and try and keep things manageable. A common idea, in this situation, is to group some source files together to split out as a static library. I'm going to argue that this actually does very little, in itself, to increase modularity, can have the effect of significantly increasing dependencies, and is maybe not such a good idea, after all. Break it apart? So yeah, when something gets too big to work with, it makes sense to try to break it into pieces. Given a whole bunch of source files to work with, we probably want 'pieces' bigger than individual source files, and that means grouping source files together. Perhaps there are files that can be grouped together by theme (e.g. a bunch of source files related to 'geometry'). Or perhaps some kind of layered decomposition is possible (e.g. we can identify a bunch of 'core' source files). And then we can separate this group of files from the rest of our source code by putting them in a library. Making things modular Wiktionary defines 'modular' as follows: Consisting of separate modules; especially where each module performs or fulfills some specified function and could be replaced by a similar module for the same function, independently of the other modules. Libraries are a classic archetype for a software module, and splitting our code into libraries already kind of nails the first part of that, (the bit before the semicolon), right? The bit after the semicolon is probably also worth consideration, but we can tweak the code to better address this bit, incrementally, later on, by firming up the interface, hiding implementation details, and so on. Having our source code 'consisting of modules' already feels like a good start, and a step in th