frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

An Ode to Bzip

https://purplesyringa.moe/blog/an-ode-to-bzip/
1•Expurple•2m ago•0 comments

AI is supercharging fake work

1•rxm233•2m ago•0 comments

Open Source PLFM Radar. Up to 20Km Range

https://hackaday.io/project/205190-open-source-plfm-radar-up-to-20km-range
1•ikbdsk•2m ago•0 comments

Celebrating Interesting Flickr Technologies

https://medium.com/@brightcarvings/celebrating-flickr-technology-3c93c8ddecc2
2•steerpike•3m ago•1 comments

Display of Pattern Formation Using the Gierer-Meinhardt Model

https://itp.uni-frankfurt.de/~gros/StudentProjects/Projects_2020/projekt_fischer_mrozinski/#heading2
1•o4c•3m ago•0 comments

KindScreen – a parent-reviewed catalog of safe YouTube for kids

https://kindscreen.org/
1•marcogarces•5m ago•1 comments

3D-Knitting: The Ultimate Guide

https://www.oliver-charles.com/pages/3d-knitting
2•ChadNauseam•8m ago•0 comments

Show HN: Refund and Arbitration Protocol for Agents

https://www.x402r.org/
1•AliAbdoli•11m ago•0 comments

The Isolation Trap: Erlang

https://causality.blog/essays/the-isolation-trap/
2•enz•13m ago•0 comments

Heinzel: AI-powered sysadmin ruleset. Now supports OpenCode and Ollama models

https://github.com/wintermeyer/heinzel
2•wintermeyer•14m ago•0 comments

Reliable Software in the LLM Era

https://quint-lang.org/posts/llm_era
1•mempirate•16m ago•0 comments

Pray Focus: I built an app that locks distracting apps until you finish praying

https://www.prayfocus.app/en
2•marijan_div•16m ago•1 comments

Most read-later apps are beautifully organized failure

1•northerndev•22m ago•1 comments

Someone just open sourced the OS for running company with zero employees

https://github.com/onera-app/onera-operator
2•shreyaspapi•23m ago•1 comments

Everyone's Worried About Taiwan. The Real Vulnerability Is in Wales

https://medium.com/@tbelbek/everyones-worried-about-taiwan-the-real-vulnerability-is-already-in-n...
1•rdstrtwlkr•28m ago•0 comments

Dear parents, social media are yesterday's battle

https://mfioretti.substack.com/p/dear-parents-social-media-are-yesterdays
1•pabs3•30m ago•0 comments

Wrong Ban?

https://leaflessca.wordpress.com/2026/02/09/wrong-ban/
2•pabs3•31m ago•0 comments

My identity was stolen and someone is using it to catfish men – it's terrifying

https://www.bbc.co.uk/news/articles/c89kdn3e185o
1•dijksterhuis•31m ago•0 comments

The Download: Pokémon Go to train world models, and the US-China race to find a

https://www.technologyreview.com/2026/03/11/1134174/the-download-pokemon-go-train-world-models-us...
1•joozio•32m ago•0 comments

Show HN: Guardio – control your AI Agent

https://github.com/radoslaw-sz/guardio
1•radoslaw-sz•33m ago•0 comments

America and Israel built military targeting machines: Software

https://www.economist.com/international/2026/03/11/how-america-and-israel-built-vast-military-tar...
1•supernikita•33m ago•1 comments

Physicality: The New Age of UI

https://www.lux.camera/physicality-the-new-age-of-ui/
1•tosh•40m ago•0 comments

Canadian Wind Farms

https://tech.marksblogg.com/canadian-wind-farms.html
2•marklit•42m ago•0 comments

Iran's Sea Mines Are One of Its Most Powerful Weapons

https://www.wsj.com/world/middle-east/iran-sea-mines-strait-of-hormuz-85e623b7
1•sorentwo•45m ago•0 comments

LipoJaro Review 2026: The Truth Behind the "Gelatin Trick"

https://www.facebook.com/LipoJaro.Fat.Burn
2•tayzjaik•45m ago•1 comments

Iran war oil shock accelerates Southeast Asia's EV revolution

https://www.scmp.com/week-asia/lifestyle-culture/article/3345751/iran-war-oil-shock-accelerates-s...
2•KnuthIsGod•46m ago•0 comments

Show HN: AI-powered one-click translator for Pokémon GBA ROM hacks

https://github.com/Olcmyk/Meowth-GBA-Translator
4•booffa•50m ago•2 comments

How long till every major provider sets their RSI loops in motion?

1•foxindustrial•53m ago•0 comments

GSD for Claude Code: A Deep Dive into the Workflow System

https://www.codecentric.de/en/knowledge-hub/blog/the-anatomy-of-claude-code-workflows-turning-sla...
1•kiyanwang•54m ago•0 comments

WordPress debuts a private workspace that runs in the browser

https://techcrunch.com/2026/03/11/wordpress-debuts-a-private-workspace-that-runs-in-your-browser-...
1•taubek•55m ago•0 comments