frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•11mo ago
I'd like to do some statistics over the machine code gcc generates, such as a histogram of used instructions, average volatile/preserved registers usage of functions etc. For now just x86_64 SysV-ABI would be enough.

However I'm not aware of any pre-existing tool that lets me easily do this. The options I currently see are either make gcc output assembly and write a parser for the GNU Assembler format (possibly by reusing the asm-parser of the compiler-explorer project), or write a tool that reads (disassembles) object files directly using elfutils.

Any hints, prior work, further ideas, links to useful resources, or any other kind of help would be much appreciated.

Comments

baobun•11mo ago
"Static analysis" should be a relevant search term. Assuming you don't need to tie the instructions back to C code then the "gcc" part seems circumstancial for implementation? I guess you might want to parse the ASM into an Abstract Syntax Tree (AST) represenation and work on that?

If you do want to tie it back to the source, this looks relevant: http://icps.u-strasbg.fr/~pop/gcc-ast.html

phafu•11mo ago
For my purpose I don't need to get back to the original source, no.

The gcc part is only relevant with regards to what dialect of assembler I need to parse. If I go that route, I'd write a parser for the GNU assembler, and that would of course work with any code in that dialect, regardless from which compiler it came from (I haven't checked whether other compilers can produce GNU assembler though).

The Missing Piece: A Self-Custody Wallet for AI Agents

https://pckt.blog/b/krzysu/the-missing-piece-a-self-custody-wallet-for-ai-agents-zc1vdj6
1•krzysu•56s ago•0 comments

LaDiR: Latent Diffusion Enhances LLMs for Text Reasoning

https://machinelearning.apple.com/research/ladir
1•chmaynard•1m ago•0 comments

Show HN: NeonD – self-hosted Postgres Platform with branching, PITR and backups

https://github.com/matisiekpl/neond/
1•matisiekpl•1m ago•1 comments

Meta isn't doing enough to keep kids off Facebook and Instagram, rules EU

https://www.theverge.com/tech/920313/meta-facebook-instagram-eu-dsa-age-verification
1•Brajeshwar•3m ago•0 comments

Mini Shai-Hulud: Bun Payloads Hit SAP NPM Packages

https://www.stepsecurity.io/blog/a-mini-shai-hulud-has-appeared
1•likhith190•3m ago•0 comments

Claude for Word

https://claude.com/claude-for-word
1•taspeotis•3m ago•0 comments

Show HN: Adblock-rust Manager – Firefox extension to enable the Brave ad blocker

https://github.com/electricant/adblock-rust-manager
1•electricant•3m ago•0 comments

Nobody Here: The Story of Vaporwave [video]

https://www.youtube.com/watch?v=6kNqw7UdENg
1•phaser•4m ago•0 comments

Epic Games Wins Reversal of Stay in App Store Fee Legal Battle

https://www.macrumors.com/2026/04/29/epic-games-wins-reversal-app-store-fee-battle/
1•tosh•4m ago•0 comments

I scanned 16 open-source AI agent repos – 76% of tool calls had zero guards

https://github.com/Diplomat-ai/diplomat-agent
1•jguarnelli•4m ago•0 comments

Brazil's AI adoption boom in public numbers: what IBGE, Bain and Gartner say

https://dataconcierge.dev/en/blog/brazil-ai-adoption-public-numbers
1•altruisticlove•5m ago•0 comments

Show HN: Filling PDF forms with AI using client-side tool calling

https://copilot.simplepdf.com/?share=a7d00ad073c75a75d493228e6ff7b11eb3f2d945b6175913e87898ec96ca...
3•nip•6m ago•0 comments

Anodized – catch Rust runtime bugs at compile time

https://docs.rs/anodized/latest/anodized/
2•satvikpendem•9m ago•0 comments

DARS – Field and Division‑Break Demo

https://rogmash.neocities.org/singularity
1•rogmash•9m ago•0 comments

Show HN: I built a 2nd-order PyTorch optimizer for LLMs that runs on 16GB GPUs

2•dnosoz•9m ago•2 comments

Coffee with a splash of physics: how to make the most out of your brew

https://physicsworld.com/a/coffee-with-a-splash-of-physics-how-to-make-the-most-out-of-your-brew/
2•sohkamyung•9m ago•0 comments

Building AI Agents in Python with Pydantic AI

https://machinelearningmastery.com/building-ai-agents-in-python-with-pydantic-ai/
1•eigenBasis•10m ago•0 comments

OAuth Scopes Explained (2025)

https://fusionauth.io/blog/how-to-design-oauth-scopes
1•mooreds•10m ago•0 comments

Re: Starred – A weekly email with 3 GitHub repos you starred and forgot

https://restarred.dev
1•alepricedev•10m ago•0 comments

96% of GitHub repos have high severity issues in their Action workflows

https://pin-gh-actions.kammel.dev/zizmor
2•datosh•10m ago•1 comments

It Just Has to Work

https://michaelheap.com/it-just-has-to-work/
1•mooreds•10m ago•0 comments

Google's Liz Reid on Who Will Own Search in a World of AI [video]

https://www.youtube.com/watch?v=DP8qe2Qo2-s
1•mooreds•11m ago•0 comments

Buckets and objects are not enough

https://sagi.org/posts/buckets-and-objects-are-not-enough/
1•sagiba•11m ago•0 comments

Versioned, portable LLM prompts as a spec – not a framework

https://promptpack.org/docs/rfcs/workflow-composition/
1•chaholl•13m ago•0 comments

Dtdss, Dtdss Algorithm, Dtdss Soft Sensing, Dtdss Sensor

https://arxiv.org/abs/2604.15352
1•iopoer•15m ago•0 comments

Is this the screenshot tool Linux users want?

https://apexshot.org
1•codegoddy•16m ago•0 comments

The U.S. Wants to Ban China's High-Tech Cars, They're Already Here in El Paso

https://www.wsj.com/business/autos/chinese-cars-byd-geely-u-s-mexico-be0dea28
2•impish9208•18m ago•1 comments

Strategic Polysemy in AI Discourse

https://arxiv.org/abs/2604.21043
1•inimaz•20m ago•0 comments

GitHub rushed to fix a critical vulnerability in less than six hours

https://www.theverge.com/news/920295/github-remote-code-execution-vulnerability-fix
2•Brajeshwar•20m ago•2 comments

Reverse Geocoding with Overture Maps

https://tech.marksblogg.com/reverse-geocoding-overture-maps.html
1•marklit•21m ago•0 comments