Alignment refers to the practice of placing data or code at memory addresses that are multiples of a specific value, typically a power of 2. This is typically done to meet the requirements of the prog| MaskRay
The LLVM Project has officially released LLVM 21.1, the first stable release of the LLVM 21 compiler stack. This half-yearly update to the widely used open-source compiler infrastructure introduces significant hardware support, new C and C++ language features, and enhancements across multiple components. New hardware targets Among the most notable changes is the introduction of […]| System Administration
In my previous post, LLVM integrated assembler: Improving expressions and relocations delved into enhancements made to LLVM's expression resolving and relocation generation. This post covers recent re| MaskRay
In my previous assembler posts, I've discussed improvements on expression resolving and relocation generation. Now, let's turn our attention to recent refinements within section fragments. Understandi| MaskRay
libfprint, the fingerprint reader driver library, is nearing a 1.0 release.| /bɑs ˈtjɛ̃ no ˈse ʁɑ/ (hadess) | News
For years, I've been involved in updating LLVM's MC layer. A recent journey led me to eliminate the FK_PCRel_ fixup kinds: MCFixup: Remove FK_PCRel_ The generic FK_Data_ fixup kinds handle both absolute and PC-relative fixups. ELFObjectWriter sets IsPCRel to true for `.long foo-.`, so the backend has to handle PC-relative FK_Data_. However, the existence of FK_PCRel_ encouraged backends to implement it as a separate fixup type, leading to redundant and error-prone code. Removing FK_PCRel_ sim...| MaskRay
Both compiler developers and security researchers have built disassemblers. They often prioritize different aspects. Compiler toolchains, benefiting from direct contributions from CPU vendors, tend to offer more accurate and robust decoding. Security-focused tools, on the other hand, often excel in user interface design. For quick disassembly tasks, rizin provides a convenient command-line interface.| MaskRay
LLD, the LLVM linker, is a mature and fast linker supporting multiple binary formats (ELF, Mach-O, PE/COFF, WebAssembly). Designed as a standalone program, the code base relies heavily on global state, making it less than ideal for library integration. As outlined in RFC: Revisiting LLD-as-a-library design, two main hurdles exist: Fatal errors: they exit the process without returning control to the caller. This was actually addressed for most scenarios in 2020 by utilizing llvm::sys::Process:...| MaskRay
LLVM's C++ API doesn't offer a stability guarantee. This means function signatures can change or be removed between versions, forcing projects to adapt. On the other hand, LLVM has an extensive API surface. When a library like llvm/lib/Y relies functionality from another library, the API is often exported in header files under llvm/include/llvm/X/, even if it is not intended to be user-facing. To be compatible with multiple LLVM versions, many projects rely on #if directives based on the LLVM...| MaskRay
LLVM 19 will be released. As usual, I maintain lld/ELF and have added some notes to https://github.com/llvm/llvm-project/blob/release/19.x/lld/docs/ReleaseNotes.rst. I've meticulously reviewed nearly| MaskRay
Explanation of Static Single Assignment Algorithm for MLIR| Eduardo Blázquez’s Personal Webpage
Just sharing ~100 slides about PyTorch 2 internals focusing on recent innovations (Dynamo, Inductor, and ExecuTorch). I had a lot of fun preparing this and The post PyTorch 2 Internals – Talk first appeared on Terra Incognita.| Terra Incognita
In my previous post, LLVM integrated assembler: Improving MCExpr and MCValue delved into enhancements made to LLVM's internal MCExpr and MCValue representations. This post covers recent refinements to| MaskRay
In my previous post, Relocation Generation in Assemblers, I explored some key concepts behind LLVM’s integrated assemblers. This post dives into recent improvements I’ve made to refine that system. Th| MaskRay
This guide is for Mac, but the tools are platform agnostic, so you can adjust them to your environment. I’m assuming you have Vim 9 or newer, and Homebrew installed. Install LLVM: Then check that clangd exists: Now make a directory for the language server plugin on Vim: Clone the git repository for the language […]| Ian's notes
This post explores how GNU Assembler and LLVM integrated assembler generate relocations, an important step to generate a relocatable file. Relocations identify parts of instructions or data that canno| MaskRay
This post describes how to compile a single C++ source file to an object file with the Clang API. Here is the code. It behaves like a simplified clang executable that handles -c and -S.| MaskRay
This article describes ELF interposition, the linker option -Bsymbolic, and its friends. In the end, it will discuss an ambitious plan which I dubbed "the Last Alliance of ELF and Men". Motivated by a| MaskRay
Updated in 2022-09. Background: -fno-pic can only be used by executables. On most platforms and architectures, direct access relocations are used to reference external data symbols. -fpic can be used| MaskRay
LLVM 20 will be released. As usual, I maintain lld/ELF and have added some notes to https://github.com/llvm/llvm-project/blob/release/20.x/lld/docs/ReleaseNotes.rst. I've meticulously reviewed nearly all the patches that are not authored by me. I'll delve into some of the key changes.| MaskRay
While Trail of Bits is known for developing security tools like Slither, Medusa, and Fickling, our engineering efforts extend far beyond our own projects. Throughout 2024, our team has been deeply …| Trail of Bits Blog
Clang provides a few options to generate timing report. Among them, -ftime-report and -ftime-trace can be used to analyze the performance of Clang's internal passes. -fproc-stat-report records time a| MaskRay
Some time ago I was talking about an ahead-of-time Ruby compiler. We started the project with certain goals and hypotheses in mind, and while the original compiler is at nearly 90% completion, there are still those other 90% that needs to be done.| The LLVM Project Blog
GNU ld's output section layout is determined by a linker script, which can be either internal (default) or external (specified with -T or -dT). Within the linker script, SECTIONS commands define how i| MaskRay
Hi folks, its been a while! In this post I'm going to talk about getting started with LLVM and I'll discuss writing a basic pass which we will build on as the post series develops.| k3170
LLVM 18 will be released. As usual, I maintain lld/ELF and have added some notes to https://github.com/llvm/llvm-project/blob/release/18.x/lld/docs/ReleaseNotes.rst. I've meticulously reviewed nearly| MaskRay
This article describes some notes about z/Architecture with a focus on the ELF ABI and ELF linkers. An lld/ELF patch sparked my motivation to study the architecture and write this post. z/Architecture| MaskRay
总体介绍编译器和中间表示 (LLVM IR, SPIR-V, and MLIR) 的发展历史和演进趋势| Lei.Chat()
Overall discussion on compilers and IRs (LLVM IR, SPIR-V, and MLIR): why they are in their current manner and how they would evolve| Lei.Chat()
This article describes SHF_ALLOC|SHF_COMPRESSED sections in ELF and lld's linker option --compress-sections to compress arbitrary sections.| MaskRay
UNDER CONSTRUCTION This article describes target-specific details about AArch32 in ELF linkers. I described AArch64 in a previous article. AArch32 is the 32-bit execution state for the Arm architectur| MaskRay
This article describes target-specific details about AArch64 in ELF linkers. AArch64 is the 64-bit execution state for the Arm architecture. The AArch64 execution state runs the A64 instruction set. T| MaskRay
This article describes target-specific details about Power ISA in ELF linkers. Initially there was IBM POWER. The 1991 Apple–IBM–Motorola alliance created PowerPC. In 2006, the architecture was rebran| MaskRay
Updated in 2024-08. Note: The article will likely get frequent updates in the next few days. This article describes some approaches to distribute debug information. Commands below will use two simple| MaskRay