frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•1y 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•1y 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•1y 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).

Elon Musk and Dario Amodei Are Burying the Hatchet in Sam Altman's Back

https://nymag.com/intelligencer/article/anthropic-dario-amodei-xai-elon-musk-team-up-against-open...
1•htrp•14s ago•0 comments

Show HN: Yt-x v0.8.0 – Browse, play, and download YouTube from the terminal

https://github.com/Benexl/yt-x
1•Benex254•49s ago•0 comments

ExtraBrain – local-first desktop copilot for live calls

1•andrewsokolov•1m ago•0 comments

Ternative – C++/CUDA inference engine for ternary LLMs with runtime LoRA

https://github.com/michelangeloromerochisco/ternative
1•michelangeloro•2m ago•1 comments

The Mass Matrix and the Mug, Why a Robot Slows Down When It Picks Something Up

https://atomsfrontier.substack.com/p/the-mass-matrix-and-the-mug-why-a
1•jpatel3•2m ago•0 comments

A brief investigation into the GPT-5.5 regression claims

https://www.stet.sh/blog/gpt-55-high-regression-check-graphql-go-tools
1•bisonbear•5m ago•0 comments

The Prehistory of A.I. Slop

https://www.newyorker.com/magazine/2026/05/25/the-prehistory-of-ai-slop
1•mitchbob•7m ago•1 comments

Ensemble-bias-detector – property tests for voting aggregators

https://github.com/fuentesamurai/ensemble-bias-detector
1•killersamurai•9m ago•1 comments

Crossview 4.4.0 is now available

https://github.com/crossplane-contrib/crossview
2•moeidheidari•10m ago•1 comments

Era: From Nature publication to catalyzing Computational Discovery

https://research.google/blog/empirical-research-assistance-era-from-nature-publication-to-catalyz...
4•praccu•10m ago•0 comments

OpenAI Adopts Google's SynthID Watermark for AI Images with Verification Tool

https://openai.com/index/advancing-content-provenance/
3•smooke•10m ago•0 comments

Why are university students booing big tech at graduation ceremonies?

https://english.elpais.com/technology/2026-05-19/generational-rejection-of-ai-why-are-university-...
3•geox•11m ago•1 comments

They're Closing the Best Boondocking Spots – Here's the Proof

https://liketheresnotomorrow.net/blm-camping-restrictions-2026/
2•bilegeek•13m ago•0 comments

The Unreasonable Effectiveness of ProseMirror Model in Rich Text Transformation

https://smoores.dev/post/unreasonable_effectiveness_of_prosemirror/
1•birdculture•14m ago•0 comments

Nespresso Coffee Capsule Info

https://docs.google.com/spreadsheets/d/1kZJCdTmqQla2ha3DDYyixQDIUuf9wLvt3122akBkhgM/edit?gid=7456...
1•skogstokig•14m ago•0 comments

Perhaps the Poll Voting plugin should be ready soon

https://postwits.com
1•eagle10ne•15m ago•0 comments

Marketing

1•ajjuramdam•15m ago•0 comments

Sony's 1000X the ColleXion Headphones Make the AirPods Max 2 Look Affordable

https://gizmodo.com/sonys-1000x-the-collexion-wireless-headphones-make-the-airpods-max-2-look-aff...
1•giwook•15m ago•0 comments

Edmund Phelps, Who Upended the Way We View Inflation, Dies at 92

https://www.nytimes.com/2026/05/18/business/economy/edmund-phelps-dead.html
1•paulpauper•16m ago•0 comments

AI-written story published in Granta, wins major literary prize

https://twitter.com/ATabarrok/status/2056399339174469827
3•paulpauper•16m ago•0 comments

SaaSpocalypse now? These founders don't think so

https://betakit.com/saaspocalypse-now-these-founders-dont-think-so/
1•builtbystef•17m ago•0 comments

WTF happened to Claude Code ext in antigravity?

https://antigravity.google/docs/ide-getting-started?app=antigravity
2•ajalexander•18m ago•0 comments

Is It Worth Investing in Index Funds? What 90% of Investors Get Wrong About Fees

https://comuniq.xyz/post?t=1109
1•01-_-•18m ago•0 comments

Ask HN: Is there a good code intelligence MCP server yet?

2•fariswyatt•22m ago•0 comments

Dumb Ways for an Open Source Project to Die

https://nesbitt.io/2026/05/19/dumb-ways-for-an-open-source-project-to-die.html
3•chmaynard•22m ago•0 comments

The Relevance of BPMN in the Age of AI

https://medium.com/spiffworkflow/the-relevance-of-bpmn-in-the-age-of-ai-1f28440440e5
1•danfunk•23m ago•1 comments

We Got Lost in AI

https://hmmr.online/posts/we-got-lost/
2•ZanderHammer•23m ago•0 comments

ZPL – a deterministic engine for binary-matrix bias scoring

https://zeropointlogic.io
2•cicicalex•26m ago•1 comments

Spring Cleaning

https://blog.bayindirh.io/blog/spring-cleaning/
1•bayindirh•26m ago•0 comments

Mistral AI Acquires Emmi AI to Create the Leading AI Stack

https://www.emmi.ai/news/mistral-ai-acquires-emmi-ai
4•doener•31m ago•0 comments