frontpage.
newsnewestaskshowjobs

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).

Behind the scenes with the Midjourney scanner [video]

https://www.youtube.com/watch?v=4nzzpUKhj1M
1•Semkas•13s ago•0 comments

Simulating Tradeoffs in AI Organisation

1•rando77•1m ago•0 comments

Hackers shoveled snow for company, were rewarded with network admin access

https://www.theregister.com/security/2026/07/02/hackers-shoveled-snow-for-company-were-rewarded-w...
2•ike_usawa•2m ago•0 comments

Show HN: SlideShow – a simple, cross-platform full-screen photo slideshow

https://github.com/ftaisdeal/cross-platform-slideshow
2•ftaisdeal•7m ago•0 comments

Meta's Zuckerberg says AI agent tech progressing slower than expected

https://finance.yahoo.com/technology/ai/articles/exclusive-zuckerberg-says-ai-agent-201123441.html
2•ssram•8m ago•1 comments

Claude Code Dynamic Island on macOS

https://pookify.vercel.app/
2•eyadh•9m ago•1 comments

War Crimes Archive

https://archivegenocide.com/
5•TomeveilSeeker•9m ago•0 comments

Learn the Knowledge of London

https://tfl.gov.uk/info-for/taxis-and-private-hire/licensing/learn-the-knowledge-of-london
2•haunter•10m ago•0 comments

ElevenLabs at $22B: no new money, just employees selling shares

https://freemalta.com/hub/library/elevenlabs-is-worth-22-billion-no-new-money-came-in
2•ilhaniremyuce•11m ago•0 comments

Atomic Force Microscope video, steel etching, bacteria – Applied Science

https://www.youtube.com/watch?v=DyIQkqBXhS0
2•mhb•13m ago•0 comments

Show HN: Foundera – AI-powered founder and startup feedback platform

https://foundera.app/
2•toyji•14m ago•0 comments

Codex vs. Claude Code

https://www.augmentedswe.com/p/codex-vs-claude-code-2c0
1•wordsaboutcode•14m ago•0 comments

Robotic bird targets drones' biggest aerodynamic shortcoming

https://newatlas.com/drones/robotic-bird-drones-aerodynamic-problem-rmit/
1•breve•17m ago•0 comments

Semantic Manifest – An open specification for AI crawler ingestion

https://github.com/CKL75/semantic-manifest-specification
1•CKL75•19m ago•0 comments

When AI Comes to the Workplace: Ethics, Employee Empowerment and Privacy

https://read.misalignedmag.com/when-ai-comes-to-the-workplace-ethics-employee-empowerment-and-pri...
2•lcubw•19m ago•0 comments

Valve open source the Steam Machine e-ink screen so you can make your own

https://www.gamingonlinux.com/2026/07/valve-open-source-the-steam-machine-e-ink-screen-so-you-can...
9•ahlCVA•19m ago•0 comments

PostgreSQL and the OOM Killer: Why You Must Use Strict Memory Overcommit

https://www.ubicloud.com/blog/postgresql-and-the-oom-killer-why-we-use-strict-memory-overcommit
3•furkansahin•21m ago•0 comments

The Fall and Rise of Screwworm

https://www.construction-physics.com/p/the-fall-and-rise-of-screwworm
2•crescit_eundo•22m ago•0 comments

Collision in space is not evidence of dark matter after all?

https://www.uni-bonn.de/en/news/collision-in-space-is-not-evidence-of-dark-matter-after-all
1•mpweiher•23m ago•0 comments

Show HN: I built a website showing the likelihood of the AI bubble to pop

https://laurentiugabriel.github.io/is-ai-hype-cooling-down/
6•laurentiurad•26m ago•4 comments

I built a Chrome extension that speaks notifications aloud, keywords filtered

https://chromewebstore.google.com/detail/serious-notification-spea/hnaggblalhlbihfaegbknioadncpcged
1•m-bilal-khan•26m ago•0 comments

Embodied.cpp: A Portable Inference Runtime of Embodied AI Models

https://arxiv.org/abs/2607.02501
1•chrsw•26m ago•0 comments

Zuckerberg 'Admits' Meta's Layoffs Were Ineffective

https://eshumarneedi.com/2026/07/03/zuckerberg-admits-metas-layoffs-were.html
4•ExMachina73•26m ago•1 comments

Show HN: Spark KNE Verify – Verify selected AI claims in the browser

https://chromewebstore.google.com/detail/spark-kne-verify/ncegakjnphdojnjlohobacncplbkbfdc
1•knespark•28m ago•0 comments

My Students Hate AI. But They Can't Stop Using It

https://www.chronicle.com/article/my-students-hate-ai-but-they-cant-stop-using-it
3•sseagull•28m ago•1 comments

Gemini Code Assist will be shut down on July 17

https://docs.cloud.google.com/gemini/docs/code-review/review-repo-code
2•ushakov•28m ago•0 comments

X has suddenly banned an account documenting Trump's corrupt stock trades

https://twitter.com/HQNewsNow/status/2072699828337864871
7•doener•29m ago•1 comments

Toward Better Hip Kernel Generation for AMD GPUs

https://scalingintelligence.stanford.edu/blogs/hipkernels/
1•skidrow•30m ago•0 comments

Please Stop the AI Confidence Theater

https://www.elenaverna.com/p/please-stop-the-ai-confidence-theater
2•skadamat•30m ago•0 comments

Failed blockchain project ends with big fine for fibs about it being on track

https://www.theregister.com/software/2026/07/03/failed-blockchain-project-ends-with-big-fine-for-...
1•jnord•30m ago•0 comments