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

The advent of capable AI tools has highighted a variant of Simpson's paradox

https://mathstodon.xyz/@tao/117169038028698262
1•ColinWright•31s ago•0 comments

Australia's Nationwide Phone Outage Was an Embarrassing Failure

https://hackaday.com/2026/08/27/australias-nationwide-phone-outage-was-an-embarrassing-failure/
1•anonymousiam•1m ago•1 comments

My GE smart scale's body fat is just 1.5 × BMI − 17.5

https://aiandtractors.com/ge-cs10h-body-fat-formula/
1•Icons8•2m ago•0 comments

Using LLMs to Make the Emacs Web Browser Great Again

https://www.sammystraus.com/#using-llms-to-make-the-emacs-web-browser-great-again
1•sammy0910•2m ago•0 comments

The Night the Earth Shook, Strangers Started to Draw

https://sheets.works/data-viz/strangers-draw-maps
1•sebg•3m ago•0 comments

Intelligence Is the Primitive. Applications Are the Diffusion Layer

https://www.a16z.news/p/intelligence-is-the-primitive-applications
1•gmays•3m ago•0 comments

Running local large language models: not as difficult as you might think

https://vitaexmachina.substack.com/p/running-local-large-language-models
1•sebg•4m ago•0 comments

Ask HN: Note taking app good at Spanish?

1•prios8•4m ago•0 comments

Show HN: OpenTIE and OpenXWA, Modern Ports of Tie Fighter and X-Wing Alliance

https://github.com/elyosh/OpenTIE/
2•elyosh•7m ago•0 comments

Why Are Rivers So Mathematical?

https://www.quantamagazine.org/why-are-rivers-so-mathematical-20260810/
2•sebg•9m ago•0 comments

Buried in Meta's $18B settlement is a legal pass on kids' data

https://techcrunch.com/2026/08/27/buried-in-metas-18b-settlement-is-a-legal-pass-on-kids-data/
2•sbulaev•11m ago•0 comments

Knowledge Health: observability for your knowledge base

https://falconer.com/notes/knowledge-health/
1•fagnerbrack•17m ago•0 comments

Why I Am Right About AI [by Paul "Claude" Gigot]

https://www.theatlantic.com/technology/2026/08/paul-claude-gigot-why-i-am-right-about-ai/688434/
3•samizdis•22m ago•1 comments

Show HN: T2 Linux Touch ID PoC

https://github.com/jmurth1234/t2-touchid-linux
1•jmurth1234•23m ago•0 comments

Situs Inversus

https://en.wikipedia.org/wiki/Situs_inversus
2•sjclemmy•25m ago•0 comments

Show HN: I put 20 ad slots under a Harberger tax

https://anyonecanbuy.com/
2•nadermx•26m ago•0 comments

Show HN: ArtGram – a notation system for abstract paintings

https://artgraph.co/artgram
1•rituraj•30m ago•0 comments

AI's memory crunch is coming for Android apps

https://techcrunch.com/2026/08/27/ais-memory-crunch-is-coming-for-android-apps/
2•627467•31m ago•0 comments

AI Engineer Notebooks – free, framework-free RAG/agents/evals on Colab

https://github.com/calmrocks/ai-engineer-notebooks
2•calmrocks•31m ago•0 comments

I built a pure-Rust headless browser. No Chromium. No V8

https://www.reddit.com/r/webscraping/comments/1w07jov/i_built_a_purerust_headless_browser_no_chro...
2•syumei•31m ago•0 comments

Copyrightability of LLM-generated code: Can we license "vibe code"?

https://fsfe.org/news/2026/news-20260825-01.en.html
2•WhyNotHugo•32m ago•0 comments

Intel previews future instruction-set documentaton

https://intel.github.io/SDM/announcement/2026/08/20/announce-preview.html
2•mmcloughlin•33m ago•0 comments

Outbid case study: auction became the ad (2026)

https://medium.com/@threadotter/outbid-case-study-auction-became-the-ad-2026-719bf85c3c7d
1•threadotter•34m ago•0 comments

Four reproducible vLLM parser failures that return 200 with the wrong tool call

https://ingot.tools/reports/parser-silent-failure
1•glitch003•36m ago•0 comments

Anomalyco/OpenCode & Aider-AI/aider Review

https://github.com/anomalyco/opencode
1•paretolaw•37m ago•2 comments

Show HN: IQ Routing – route every call to the cheapest model that holds quality

https://iq-routing.com
1•Georgeavvila•38m ago•0 comments

Show HN: Per Diem, a daily dice game like Balatro

https://perdiem.loch.tools
1•lwansbrough•38m ago•0 comments

Storm Summoner, a MIDI controller for effects pedals

https://kabaragoya.com/products/storm-summoner
1•peteforde•39m ago•0 comments

The Minolta SR-T I kept for myself

https://robertmay.photography/journal/the-minolta-sr-t-i-kept-for-myself
1•robotmay•40m ago•0 comments

Agent Swarms Are a Distributed Systems Problem

https://www.trychroma.com/engineering/transactions
1•rescrv•44m ago•1 comments