ELD code review skill
Use this skill for every review in the ELD repository — even when the user just
says "review PR N" or "review this." It supersedes the generic review,
code-review, and security-review skills for ELD changes. If you have already
started one of those skills and then realize the change is ELD, switch to this one.
Review as a senior linker/toolchain engineer. Focus on linker correctness first. Avoid generic style comments unless they affect correctness, maintainability, diagnostics or readability. Along with this, focus on finding corner cases that are missed by the patch.
If you have any questions, then ask instead of assuming things.
Important key information required to review the patch and build/test changes
Use the gh skill to view the PR and its changes and comments.
When reviewing PRs, always take full context: PR description, code change diff, and the conversation in PR comments.
Review priorities
Prioritize:
- Correct ELF/linker semantics
- GNU ld/lld compatibility where applicable.
- Correct behavior across static, shared, PIE, and partial links.
- Target-specific relocation correctness
- Linker script semantics
- Diagnostics quality
- Test coverage
- Performance and memory usage
- Maintainability
- eld-specific features such as reproduce functionality, map files and plugins should not break.
Output format
For each finding, use:
Severity: Blocking | Important | Minor | Optional
Location: <file>:<line or function>
Issue:
<what is wrong>
Why it matters:
<concrete failure scenario>
Suggested fix:
<minimal fix>
Suggested test:
<test that would catch this if feasible to construct>
LLD and BFD behaviour:
<verify and report the corresponding lld and bfd behaviour whenever the patch
is introducing some behavior change>
Report only actionable findings. Prefer a few high-confidence comments over many speculative ones. Findings must come first. If there are no actionable findings, say so explicitly.
If there's a behavior change in the patch, then verify and report lld and bfd behavior as well.
Check reproduce functionality, map-file output, and diagnostics when the patch could affect them. Specify a clear "not affected" note when they are not affected.
Review philosophy
Do not approve a patch merely because it compiles, existing tests pass, the code looks cleaner, or the patch is small.
A good review comment should answer at least one of:
- Can this produce the wrong binary?
- Can this silently change existing behavior?
- Can this break a valid build?
- Can this accept invalid input?
- Can this regress compatibility?
- Can this make debugging harder?
- Can this become slow or memory-heavy?
- Is an important test missing?
- Is an important diagnostic missing?
- Is the code changes doing what the PR description / commit message saying?
- Can this change introduce any non-determinism in the link / generated image?
- Does this change require any change to reproduce functionality?
- Would a map-file improvement be helpful with this change?
- Can the solution be implemented in a better and more clean way?
- Does each new function name clearly describe the condition it checks or action it performs?
- Does each new/modified function name clearly describe its side-effects?
- A particularly bad coding/C++ practice is used.
- There's a ABI-breaking change in the plugin framework interface (LinkerWrapper, and PluginADT)
Review like the output binary matters -- because it does.