Skip to content

chore(dev): binary-report.sh for ELF size and relocation reports - #1479

Open
duncanista wants to merge 3 commits into
jordan.gonzalez/dev-patch-deps/featurefrom
jordan.gonzalez/dev-binary-report/feature
Open

duncanista wants to merge 3 commits into
jordan.gonzalez/dev-patch-deps/featurefrom
jordan.gonzalez/dev-binary-report/feature

Conversation

@duncanista

@duncanista duncanista commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

TL;DR: A script that reports ELF section sizes, relocations, linked libraries and size per crate, and compares two binaries.

Why: Binary size and relocations drive the page-ins from the compressed /opt at cold start. When the size changes, this shows which crate it comes from.

Overview

Jira: SVLS-9976

Stacked on #1478 (jordan.gonzalez/dev-patch-deps/feature).

scripts/dev/binary-report.sh (wrapper of binary_report.py) prints a JSON report for a
Linux ELF binary without readelf or cargo bloat, so it also runs on macOS:

  • file and section sizes, dynamic relocation counts (.rela.dyn, .relr.dyn), NEEDED
    libraries, BIND_NOW and PIE flags;
  • for an unstripped binary, the top crates by .text size from the symbol table;
  • --diff old adds the deltas.

The GitLab binary report job later in this stack uses it.

Size: 269 core lines, 288 lines in total.

Testing

  • applies on the previous PR of the stack: pass
  • shellcheck 0.10.0 on the new scripts: pass
  • python3 -m py_compile: pass
  • Ran on an unstripped Linux ELF and on a stripped arm64 release binary.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T21:38:05.164290Z 880b92f New commits
🔒 Security Review ✅ Completed 2026-10-28T21:33:25.146433Z 880b92f New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 06470fe9a9

ℹ️ 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".

Comment thread scripts/dev/binary_report.py Resolved
Comment thread scripts/dev/binary_report.py Resolved
Comment thread scripts/dev/binary_report.py Resolved
@datadog-prod-us1-6

This comment has been minimized.

@duncanista duncanista changed the title [SVLS-9976] chore(dev): binary-report.sh for ELF size and relocation reports chore(dev): binary-report.sh for ELF size and relocation reports Oct 28, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 880b92fe7a

ℹ️ 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".

Comment thread scripts/dev/binary_report.py Resolved
Comment thread scripts/dev/binary_report.py Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant