跳转至

ev-mold-nullptr-section-member-003

字段 值
项目 rui314/mold
固定 commit 27162691b71a
路径 src/mold.h
行段 L272-L277
特性 nullptr
许可证 MIT
代码来源 项目源码
级别 manual
审核 zyuhao7 @ 2026-10-27
测试代码 否
发现方式 manual

用法

用 nullptr 初始化可选的输出节指针成员

为什么典型

成员默认空值表示尚未归属输出节,nullptr 与指针类型直接匹配。

摘录

  std::pair<SectionFragment<E> *, i64>
  get_fragment(Context<E> &ctx, const ElfRel<E> &rel);

  ObjectFile<E> &file;
  OutputSection<E> *output_section = nullptr;
  i64 sh_size = -1;

备注

生产路径;输入节到输出节的映射在后续阶段建立。

查看固定 commit 源码 · 返回证据索引