frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

True Ventures Predicts iPhone Obsolescence in 5 Years

https://www.techbuzz.ai/articles/true-ventures-predicts-iphone-obsolescence-in-5-years
1•ashishgupta2209•2m ago•0 comments

The Second Great Error Model Convergence

https://matklad.github.io/2025/12/29/second-error-model-convergence.html
1•thunderbong•3m ago•0 comments

Move 37 and the Case for "Alien" Agent Workflows

https://www.chasewhughes.com/writing/beyond-the-replica-the-case-for-first-principles-agents
2•digitcatphd•5m ago•1 comments

Cursor Is Building the Workflow

https://json-server.dev/2026-dev-tools-year/
1•ankit84•7m ago•0 comments

GraphRouter: A Graph-Based Router for LLM Selections

https://github.com/ulab-uiuc/GraphRouter
1•tao2024•9m ago•0 comments

New documentary 'A Glitch in the Matrix' explores simulation theory

https://www.pastemagazine.com/movies/a-glitch-in-the-matrix/glitch-in-the-matrix-documentary-trai...
1•cumo•9m ago•0 comments

What's the right way to route queries across multiple LLMs?

https://github.com/ulab-uiuc/LLMRouter
1•tao2024•12m ago•0 comments

Recordings from the 39th Chaos Communication Congress (39C3)

https://media.ccc.de/c/39c3
1•utopiah•25m ago•1 comments

Pronoia

https://en.wikipedia.org/wiki/Pronoia_(psychology)
1•momonga•28m ago•0 comments

Show HN: EventFlux – Lightweight stream processing engine in Rust

https://github.com/eventflux-io/engine
1•grainier•28m ago•0 comments

The Color Palettes of Vincente Minnelli

https://vinpauld.blogspot.com/2014/04/the-color-palettes-of-vincente-minnelli.html
2•handfuloflight•38m ago•0 comments

Qwen-Image-2512 AI Image Generator

https://qwen-image-2512.org/
1•bennyskd•41m ago•1 comments

Fantastic Reasoning Behaviors and Where to Find Them

https://arxiv.org/abs/2512.23988
3•frozenseven•41m ago•0 comments

The Cult of Costco

https://www.theatlantic.com/newsletters/2025/12/costco-is-an-american-achievement/685411/
2•sanreau•47m ago•0 comments

Agentic AI takes over predictions for 2026

https://www.forbes.com/sites/markminevich/2025/12/31/agentic-ai-takes-over-11-shocking-2026-predi...
1•cumo•47m ago•0 comments

Seeing in the New Year with Dinner in a Dinosaur

https://www.bbc.com/news/articles/cx2pgwj19plo
1•madaxe_again•53m ago•0 comments

Nationwide Tax Strike

https://twitter.com/i/status/2006130536184422555
4•barrister•56m ago•0 comments

A Solid Load of Bull

https://loup-vaillant.fr/articles/solid-bull
1•enz•57m ago•0 comments

Kowloon Walled City Documentary (English Subtitles) [video]

https://www.youtube.com/watch?v=S-rj8m7Ssow
2•thunderbong•58m ago•0 comments

100 blog posts, 6 years, 5 million views

https://austinhenley.com/blog/100.html
1•saikatsg•1h ago•0 comments

IQuest-Coder-V1

https://github.com/IQuestLab/IQuest-Coder-V1
1•miohtama•1h ago•0 comments

I accidentally indexed my SaaS using Google's site: search

https://www.google.com/search?q=site%3Avect.pro&oq=&gs_lcrp=EgZjaHJvbWUqCQgAECMYJxjqAjIJCAAQIxgnG...
1•WoWSaaS•1h ago•1 comments

The Math Book (2012)

https://sprott.physics.wisc.edu/pickover/math-book.html
2•vismit2000•1h ago•0 comments

Denmark becomes first country in world to end letter delivery

https://www.abc.net.au/news/2025-12-31/denmark-postal-service-ends-letter-delivery/106188988
10•Tomte•1h ago•5 comments

MHC: Manifold-Constrained Hyper-Connections

https://arxiv.org/abs/2512.24880
3•ipnon•1h ago•0 comments

Ask HN: How did you learn to code?

11•chistev•1h ago•42 comments

The State of OSS Funding data [pdf]

https://github.com/andrew/state-of-oss-funding/blob/032d4b6134b36ea3c0aa378ee946ad4f77a2ac79/slid...
1•8organicbits•1h ago•0 comments

Bulgaria and the Euro

https://en.wikipedia.org/wiki/Bulgaria_and_the_euro
2•tosh•1h ago•0 comments

Why many projects fail before execution begins

2•BenWebbProject•1h ago•0 comments

AI Disclosure Under U.S. Securities Law

https://zenodo.org/records/18113674
1•businessmate•1h ago•1 comments