frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•10mo 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•10mo 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•10mo 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).

ThinkPad X14 with Magic Bay

https://www.notebookcheck.net/A-ThinkPad-laptop-with-modules-Unannounced-slim-Lenovo-ThinkPad-X14...
1•bpierre•3m ago•0 comments

Is this the right approach to go from zero to designing quantum algorithms?

https://darshanfofadiya.com/zero-to-quantum/
1•DARSHANFOFADIYA•4m ago•1 comments

AI-powered 10-minute habit that taught my kid to read (and made me a better dad)

https://talperry.com/en/posts/genai/learning-to-read-with-ai/
1•teleforce•4m ago•0 comments

Getting Started in Common Lisp

https://lisp-stat.dev/blog/2026/03/09/getting-started/
1•oumua_don17•6m ago•0 comments

Would America be in recession without the super-rich?

https://www.economist.com/finance-and-economics/2026/03/08/would-america-be-in-recession-without-...
3•javanissen•6m ago•1 comments

Tesla FSD deteriorating "city miles to critical disengagement" 4,109 down to 809

https://twitter.com/GordonJohnson19/status/2031037879732883842
2•toss1•7m ago•0 comments

How fast does a protein fold? Real-time technique captures the moment

https://www.nature.com/articles/d41586-026-00755-x
1•lc0_stein•8m ago•1 comments

Planet Labs announces two week delay on imagery of Iran

https://bsky.app/profile/eliothiggins.bsky.social/post/3mgnwujow5s2f
1•alisonatwork•10m ago•0 comments

New Attack Against Wi-Fi

https://www.schneier.com/blog/archives/2026/03/new-attack-against-wi-fi.html
1•tzury•10m ago•0 comments

The Cost of 'Lightweight' Frameworks: From Tauri to Native Rust

https://www.gethopp.app/blog/hate-webkit
3•birdculture•11m ago•0 comments

Open Weights Isn't Open Training

https://www.workshoplabs.ai/blog/open-weights-open-training
4•addiefoote8•12m ago•1 comments

Async React: The Full Story

https://www.nonsoo.com/posts/async-react
1•nonsootoh•13m ago•0 comments

Halo Actor Demands Trump's White House Remove Voice from 'War Porn' Video

https://nationaltoday.com/us/dc/washington/news/2026/03/09/halo-actor-demands-trumps-white-house-...
1•croes•13m ago•1 comments

Justice Department and Live Nation settle over illegal monopoly case

https://apnews.com/article/livenation-antitrust-justice-department-0a6ef66f497e5f626096de753bfff8ce
1•healsdata•13m ago•0 comments

Evidence for improved DNA repair in the long-lived bowhead whale [pdf]

https://www.nature.com/articles/s41586-025-09694-5
1•thunderbong•14m ago•0 comments

Choosing a Sync Engine for Local-First in 2026

https://johnny.sh/blog/choosing-a-sync-engine-in-2026/
1•johnnydamacha•15m ago•0 comments

Show HN: I built an AI-powered technical interview prep tool

https://crackr.dev/
1•wa5ina•17m ago•1 comments

Can a Fashion Designer Design a Nuclear Reactor?

https://www.ersinakinci.com/p/can-a-fashion-designer-design-a-nuclear
1•earksiinni•17m ago•0 comments

Credits for Manus Registration

https://manus.im/invitation/ZQFSZCXJGQKD1GP
1•doener•17m ago•0 comments

Nvidia Is Planning to Launch an Open-Source AI Agent Platform

https://www.wired.com/story/nvidia-planning-ai-agent-platform-launch-open-source/
3•spenvo•18m ago•0 comments

NVIDIA Triton Inference Server

https://docs.nvidia.com/deeplearning/triton-inference-server/user-guide/docs/index.html
1•teleforce•18m ago•0 comments

Secret-time-machine: scan your Git history for secrets you deleted years ago

https://github.com/LakshmiSravyaVedantham/secret-time-machine
1•sravyavedantham•19m ago•1 comments

rag not lag: rl for fast agentic retrieval

https://cgft.io/blog/rag-not-lag/
2•kumama•21m ago•0 comments

Show HN: Manual code review and feedback loop for agents

https://twitter.com/backnotprop/status/2031145299738263567
1•ramoz•22m ago•0 comments

Red Alert 2 for Mac using porting kit [video]

https://www.youtube.com/watch?v=7tN-yRUtZjE
2•nomilk•24m ago•0 comments

Claude Code Starter CLI

https://github.com/cassmtnr/claude-code-starter
1•cassmtnr•25m ago•0 comments

No, it doesn't cost Anthropic $5k per Claude Code user

https://martinalderson.com/posts/no-it-doesnt-cost-anthropic-5k-per-claude-code-user/
4•jnord•27m ago•1 comments

Love in the Time of A.I. Companions

https://www.newyorker.com/magazine/2026/03/16/love-in-the-time-of-ai-companions
1•petethomas•29m ago•0 comments

Helios: Real real-time long video generation model

https://www.alphaxiv.org/abs/2603.04379
7•tzury•30m ago•2 comments

PRX Part 3 – Training a Text-to-Image Model in 24h

https://huggingface.co/blog/Photoroom/prx-part3
1•gsky•32m ago•0 comments