Conversation
There was a problem hiding this comment.
💡 Codex Review
caotral/lib/caotral/linker/builder.rb
Lines 110 to 114 in e52274c
With the new executable: false option, main_sym can be nil, but the builder still patches and prepends the _start stub. When main_sym is nil, main_offset becomes 0 and start_bytes gets a rel32 of -5, producing a call-to-self stub that is meaningless for non-executable output and shifts all .text symbols. This means linking a shared library or non-executable with linker: "self", executable: false will still embed an invalid entry stub rather than leaving the code intact, which is likely unintended and can corrupt the resulting artifact. Consider skipping the stub and symbol offset adjustment entirely when executable is false.
ℹ️ 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".
No description provided.