amos 341a37d7c0 Add the first Qwen-measured tasks from batches 28 and 29 (2 HARD, 2 MEDIUM)
Batch 29 (Zephyr and NuttX fixes) commit 2bb22bb gave NuttX mounted-path
transactions and Zephyr NVS recovery compaction as HARD and NuttX ELF
module bindings as MEDIUM. Batch 28 commit b804230 gave Mynewt JSON
arrays as MEDIUM; four of its tasks are being topped up.

Each task comes from the commit Qwen measured, its digest matches, and it
is still present at the batch branch head.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 18:03:25 +08:00
..

模块装入观察工作区

这里保留 ELF 加载库的完整读入、分段加载、符号解析和绑定上下文。port/ 只提供 host 文件/内存接口、配置、空模块注册表和可记录的架构出口;include/ 与 libs/ 是冻结的上游实现。程序不执行模块内的任何指令。

用 make smoke 运行正常加载探针,用 make diagnose 运行现场症状的公开重现。两者都会输出观察 JSON。对照 docs/elf-module-contract.md 判断模块行为;可在 tools/diagnose.py 里组合输入,并用 observe ELF文件 读取一次观察。

观察程序从 stdin 读取一行:导入名称 调用者地址 导出计数 全局地址 回调返回值 查找名称。地址为十进制整数;导出表含无关项和该导入项,计数为 2 才包含导入项;负计数表示空表;全局地址为 0 表示无全局项;查找名称为 - 表示不扫描。回调结果可用负 errno;回调事件字段依次为 kind, present, st_value, addr, r_offset, r_info, 原始字, addend, st_name, st_info, st_other, st_shndx, st_size。kind=0 为 REL 回调,kind=1 为 RELA 回调。words 是装入数据段前 64 个 64 位字。bind_errors 与 scan_errors 只记录各阶段错误级诊断条数。

最终只提交并评分:

  • libs/libc/elf/elf_bind.c
  • libs/libc/elf/elf_symbols.c

可修改这两个文件修复问题;新增文件和对其余支撑文件的修改不会被收集。验收覆盖合同全部条款,并在不同符号名、段地址、重定位分组、弱符号和回调失败下检查行为。