Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a323bd83ab
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| dynstr_offset = file.pos | ||
| file.write(dynstr_section.body.build) | ||
| size = file.pos - dynstr_offset | ||
| dynstr_section.header.set!(offset: dynstr_offset, size:) | ||
|
|
There was a problem hiding this comment.
Guard shared writes when .dynstr/.dynsym are absent
When shared: true, write_shared_dynamic_sections unconditionally dereferences dynstr_section (and later dynsym_section). If a caller uses Writer.write! directly with an ELF object that lacks these sections (e.g., from Reader or a pre-change Builder), dynstr_section/dynsym_section will be nil and this will raise NoMethodError, preventing shared output. Consider guarding for missing sections or raising a clearer error so shared doesn’t crash on valid-but-minimal ELF inputs.
Useful? React with 👍 / 👎.
.dynsym/.dynstrand.dynamicfor shared objects.Dynamicentry writer (DT_*tag/value)..dynstrstring table (at least\\0and exported symbol names)..dynsymwith null symbol + exported globals (pointing at.textfor now)..dynsym/.dynstr/.dynamic(types/links/entsize/alignment)..dynamictags with pointers/sizes after layout is known (2-pass or patch-up)..rela.dynyet).