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

I Tracked Down All 60 Birds in GTA 6: A Birder's Guide to Vice City's Wildlife

https://www.audubon.org/magazine/birds-of-gta-6-field-guide-vice-city-wildlife
1•Brajeshwar•2m ago•0 comments

Explore Riemann

https://exploreriemann.com/
1•judegomila•3m ago•0 comments

HTTP/1.1 Must Die

https://http1mustdie.com/
1•doodlesdev•3m ago•0 comments

Aletheia Aegis: Deterministic sub-millisecond output guard for AI agents

https://github.com/vikasny30/aletheia-aegis
1•vikasny30•5m ago•0 comments

Who's making all of the money in the porn industry? [video]

https://www.youtube.com/watch?v=3IsgwsuV_nE
1•cisc•12m ago•0 comments

Turn a Bambu Lab P1S 3D printer into a pen plotter

https://github.com/gtls64/p1s-pen-plotter
1•gtls64•14m ago•1 comments

I'm building GURU, a framework for a personal AI that lives alongside you

https://github.com/GuruProduction/GURUbyUnusLumen
1•introducingGURU•14m ago•0 comments

Federal Revenue When AI Replaces Labor

https://www.rand.org/pubs/research_reports/RRA4980-1.html
1•littlexsparkee•15m ago•0 comments

Bell says it's investigating cyberattack that led to potential theft of data

https://www.cbc.ca/news/business/bell-agentic-cyber-attack-9.7430468
1•MadrasThorn•18m ago•0 comments

Scaling horizontally: how we moved beyond Multi-Raft

https://enroute.sh/blog/scaling-horizontally-how-we-moved-beyond-multi-raft
1•Brajeshwar•19m ago•0 comments

Show HN: Sniffy – a free AI detector and Chrome extension

https://getsniffy.com/
1•vood•40m ago•0 comments

Ask HN: Has the quality of HN content/discussions gone down?

1•sandeepkd•40m ago•1 comments

Testing Gemini 4 Hydrogen and Argon vs. Gen 3 over 1,474 Multi-Turn Queries

https://zenodo.org/records/24412128
2•IndependentRese•44m ago•0 comments

Show HN: Musset, open-source Scrivener alternative with an AI that never writes

https://github.com/Musset-App/musset
2•julienmarie•44m ago•0 comments

Manage Kubernetes Clusters for GPU Infrastructure with Nvidia Kubernetes Engine

https://developer.nvidia.com/blog/manage-kubernetes-clusters-for-gpu-infrastructure-with-nvidia-k...
1•teleforce•46m ago•0 comments

Broadcom open-sources its Kubernetes VM manager

https://siliconangle.com/2026/11/09/broadcom-open-sources-its-kubernetes-vm-manager/
1•teleforce•47m ago•0 comments

ClawDOS – An AI coding agent for DOS

http://ricapar.net/ClawDOS/
2•Ricapar•49m ago•1 comments

Dutch Court Bars Chinese SUV in Europe over Resemblance to Land Rover Defender

https://www.reuters.com/world/china/chinas-byd-has-suv-that-infringes-jlr-defender-design-dutch-c...
1•teleforce•55m ago•0 comments

Splice-Core: Low-Order-Bit-Splicing GEMM for Energy-Efficient AI Accelerators

https://arxiv.org/abs/2611.25617
1•matt_d•56m ago•0 comments

Make America Function Again

https://www.thenation.com/article/politics/make-america-function-again/
3•worik•58m ago•0 comments

The logic of Buddhist philosophy (2014)

https://aeon.co/essays/the-logic-of-buddhist-philosophy-goes-beyond-simple-truth
2•sammatilda•1h ago•0 comments

Don't Play Anthropic's Game

https://www.nytimes.com/2026/11/19/opinion/anthropic-ipo-ai-regulation.html
8•rreyes1979•1h ago•3 comments

Show HN: Riemann Hypothesis Proof for Learners

https://riemann.tamnd.com/learn/
1•tamnd•1h ago•0 comments

Cover Your Tracks (2020)

https://www.eff.org/deeplinks/2020/11/introducing-cover-your-tracks
2•zenincognito•1h ago•0 comments

Amgi: Open-source, offline-first Anki-compatible iOS flashcard app

https://github.com/antigluten/amgi
2•rahimnathwani•1h ago•0 comments

iPhone Air Feedback

https://www.rubenerd.au/iphone-air-feedback/
1•meetpateltech•1h ago•0 comments

The Other Road

https://borretti.me/article/the-other-road
2•ianrahman•1h ago•0 comments

AMD dives on short seller report of alleged China exposure

https://www.cnbc.com/2026/11/19/amd-falls-on-short-seller-report-of-alleged-china-exposure.html
3•mgh2•1h ago•0 comments

NPM package installed Hermes Agent as root and tasked it over Telegram

https://safedep.io/blog/malicious-npm-leadstack-crm-connect-hermes-agent-backdoor
4•tech_solver•1h ago•0 comments

Tell HN: OpenRouter prompts to Minimax may have been read

9•dannyw•1h ago•2 comments