binutils Newspaper
OCTOBER 6, 2026
loongarch — Committed — Sentiment 10 / 10

LoongArch: Use less DW_LNS_fixed_advance_pc

Patch to use less DW_LNS_fixed_advance_pc for LoongArch debugging information is ready for merge.

This patch, previously reviewed and revised based on feedback, optimizes the generation of debugging information for LoongArch by judiciously using DW_LNS_fixed_advance_pc. The author inquires if the patch can now be merged, and the maintainer confirms it can be applied.

In the Thread 3 participants
  1. mengqinggang <mengqinggang@loongson.cn> proposer

    Confirms that the patch is ready to be merged and asks for confirmation.

    “Thanks! Just to confirm, can this patch be merged?”
  2. Alan Modra <amodra@gmail.com> maintainer

    Approves the patch for merging.

    “Yes.”
  3. mengqinggang <mengqinggang@loongson.cn> proposer

    Reports that the patch has been applied.

    “Thanks, applied.”

Technical Tradeoffs

  • Potentially reduces the size of DWARF debug info.
  • May increase complexity in the code generation logic.

In Details

This patch modifies gas to conditionally use DW_LNS_fixed_advance_pc for generating DWARF debugging information on LoongArch. It refines the logic to use this opcode only when linker-relaxable instructions exist between symbols, aiming to reduce the overhead of symbol value lookups.

For Context
DW_LNS_fixed_advance_pc
A DWARF Instruction Set (DIS) opcode used to advance the program counter (PC) by a fixed amount, typically for generating location lists.
DWARF
A debugging data format used by many compilers and debuggers to store information about variables, types, and program structure.
LoongArch
A RISC-based instruction set architecture developed in China.
linker-relaxable instructions
Instructions whose machine code representation can be modified by the linker during optimization (relaxation) to improve code density or performance.
symbol_get_value_expression
A function likely involved in retrieving the value or address of a symbol, potentially involving complex expressions.
Filed Under: binutilsloongarchdebuggingdwarf