Tagged articles
18 articles
Page 1 of 1
Liangxu Linux
Liangxu Linux
Oct 12, 2025 · Fundamentals

Mastering Strong and Weak Functions in C for Flexible Embedded Design

This article explains the concept of strong and weak functions in C, shows how to declare them with GCC and other compilers, outlines the linker selection rules, and demonstrates practical uses such as library overrides, interrupt handlers, callbacks, test stubs, plugin systems, and related pitfalls.

Linkerc++embedded
0 likes · 9 min read
Mastering Strong and Weak Functions in C for Flexible Embedded Design
Liangxu Linux
Liangxu Linux
Aug 31, 2025 · Fundamentals

How Linkers Resolve Virtual Addresses Before a Program Runs

This article explains why C/C++ function and global variable addresses are fixed at link time, how modern operating systems provide each process with a private virtual address space, the role of ABI and linker scripts in defining segment layout, and how the loader later maps those virtual addresses to physical memory.

C++ELFLinker
0 likes · 6 min read
How Linkers Resolve Virtual Addresses Before a Program Runs
IT Services Circle
IT Services Circle
Jul 19, 2025 · Fundamentals

How Linkers Assign Virtual Addresses Before Your Program Runs

This article explains how linkers determine virtual memory addresses during linking, describes the operating system's per‑process virtual address space, outlines ABI and ELF conventions including default base addresses and linker scripts, and shows how the loader later maps those virtual addresses to physical memory.

ELFLinkerVirtual Memory
0 likes · 5 min read
How Linkers Assign Virtual Addresses Before Your Program Runs
Liangxu Linux
Liangxu Linux
Jun 25, 2025 · Fundamentals

Why Hard-Coding Memory Addresses Is a Nightmare and How Symbols Solve It

The article explains how manually calculating absolute memory addresses for functions leads to error‑prone maintenance, introduces the concept of symbols to reference code by name, and details the role of object files, symbol tables, relocation tables, and the linking process that resolves addresses automatically.

CompilationLinkerlow‑level programming
0 likes · 8 min read
Why Hard-Coding Memory Addresses Is a Nightmare and How Symbols Solve It
Liangxu Linux
Liangxu Linux
Jul 28, 2024 · Fundamentals

Why Static Libraries Waste Space and How Dynamic Linking Saves It

This article explains the memory layout of a program, the compilation and linking processes, and compares static and dynamic libraries, highlighting how static linking duplicates code while dynamic linking shares libraries to reduce disk and memory usage.

CompilationDynamic LibraryLinker
0 likes · 7 min read
Why Static Libraries Waste Space and How Dynamic Linking Saves It
Liangxu Linux
Liangxu Linux
Jan 23, 2024 · Fundamentals

How Weak Symbols and Weak References Simplify Cross‑Platform C Development

This article explains the concept of weak symbols and weak references in C, demonstrates their behavior with practical examples, and shows how they can be leveraged to create maintainable, cross‑platform embedded drivers while addressing compiler differences and linker nuances.

C ProgrammingCross‑platform developmentLinker
0 likes · 20 min read
How Weak Symbols and Weak References Simplify Cross‑Platform C Development
Liangxu Linux
Liangxu Linux
Dec 24, 2023 · Backend Development

Mastering GNU Linker Scripts: Control Binary Layout and Memory Mapping

This guide explains how GNU ld linker scripts work, covering their purpose, basic concepts like sections, symbols, VMA/LMA, the syntax of SECTIONS, INPUT, OUTPUT, and other commands, with practical examples and code snippets for embedded and desktop ELF binaries.

BinaryELFLinker
0 likes · 30 min read
Mastering GNU Linker Scripts: Control Binary Layout and Memory Mapping
ByteDance SYS Tech
ByteDance SYS Tech
Sep 8, 2023 · Fundamentals

Why Does Your C++ Program Crash? Unveiling Global Object Initialization Order

This article explores how C++ programs start, detailing the role of the _start entry point, the initialization of global objects via .init_array, __libc_csu_init, and constructors, and provides practical techniques—including linking with crt files and using init_priority—to control and debug initialization order and avoid crashes.

C++ELFLinker
0 likes · 23 min read
Why Does Your C++ Program Crash? Unveiling Global Object Initialization Order
AI Cyberspace
AI Cyberspace
Mar 7, 2023 · Fundamentals

Unlocking the Secrets of C Compilation: From Source to Executable

This article explains the fundamental concepts behind C language compilation, covering lexical, syntax, and semantic analysis, GCC options, file types, static and dynamic linking, ELF structure, and the loader process that turns source code into a runnable program.

CompilationELFLinker
0 likes · 23 min read
Unlocking the Secrets of C Compilation: From Source to Executable
Meituan Technology Team
Meituan Technology Team
Jun 2, 2022 · Mobile Development

Optimizing Android .so Library Size: Techniques and Practices

This article explains how Meituan engineers shrink Android native .so libraries by analyzing ELF sections, simplifying dynamic symbols, removing dead code, using link‑time optimization, garbage‑collecting sections, applying size‑focused compiler flags, disabling exceptions/RTTI, and merging or extracting libraries, achieving 30‑60% APK size reductions and faster load times.

AndroidELFLTO
0 likes · 31 min read
Optimizing Android .so Library Size: Techniques and Practices
ByteDance Dali Intelligent Technology Team
ByteDance Dali Intelligent Technology Team
Oct 27, 2021 · Fundamentals

Understanding ld64 Static Linking in iOS: Architecture, Symbol Processing, and Optimization

This article provides an in‑depth technical overview of the ld64 static linker used in iOS builds, explaining its architecture, how it parses .o, .a and .dylib files, manages symbols, atoms and fixups, resolves undefined references, performs dead‑code stripping, and generates the final executable.

LinkerStatic Linkingdead strip
0 likes · 30 min read
Understanding ld64 Static Linking in iOS: Architecture, Symbol Processing, and Optimization
ByteDance Terminal Technology
ByteDance Terminal Technology
Sep 23, 2021 · Fundamentals

Understanding ld64 Static Linking on iOS: Architecture, Symbols, and Optimizations

This comprehensive guide explains the inner workings of Apple's ld64 static linker for iOS, covering its historical background, core concepts such as objects, archives, symbols, and fixups, command‑line parameters, execution phases, symbol resolution, dead‑code stripping, optimization passes, output generation, auto‑linking, the -ObjC flag, debugging options, and LTO support.

LinkerStatic Linkingdead strip
0 likes · 31 min read
Understanding ld64 Static Linking on iOS: Architecture, Symbols, and Optimizations
Liangxu Linux
Liangxu Linux
Jan 25, 2021 · Fundamentals

How Linux Kernel Invokes Module Init Functions via fs_initcall

The article explains how the Linux kernel discovers and calls module initialization functions like inet_init by using the fs_initcall macro, which creates static initcall variables placed in specially‑named sections that the linker groups and the kernel iterates at boot time.

InitcallLinkerLinux
0 likes · 8 min read
How Linux Kernel Invokes Module Init Functions via fs_initcall