frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Having Claude Untangle Me

https://pensieve1729.substack.com/p/having-claude-untangle-me
1•druub•1m ago•0 comments

A macOS app that blurs your screen when you slouch

https://github.com/tldev/posturr
1•dnw•2m ago•0 comments

Passipedia – The Passive House Resource

https://passipedia.org/
1•djoldman•4m ago•0 comments

Claude Code Swarm Mode Deep Dive: 10 agents building macOS app

https://github.com/BayramAnnakov/edu-ai-product-engineer-s3/tree/main/case_studies/claudesp-swarm...
1•Bayram•5m ago•1 comments

Agents need good developer experience too

https://modal.com/blog/agents-devex
1•birdculture•6m ago•0 comments

Sir Mark Tully, the BBC's 'voice of India', dies aged 90

https://www.bbc.com/news/articles/c4nnp4d064do
1•koolhead17•6m ago•0 comments

What Happens If Torvalds' Git Repo Goes Away?

https://www.phoronix.com/news/Linux-Kernel-Continuity-Doc
1•Corrado•8m ago•1 comments

Margin accounts have a 6:1 debt to free credit ratio – Unprecedented

https://www.finra.org/rules-guidance/key-topics/margin-accounts/margin-statistics
1•zerosizedweasle•8m ago•0 comments

'Life-threatening' storm forecast in US as states declare emergency

https://news.sky.com/story/life-threatening-winter-storm-to-hit-us-with-snow-ice-and-dangerously-...
1•Brajeshwar•9m ago•0 comments

Lawsuit Claims Meta Can See WhatsApp Chats in Breach of Privacy

https://www.bloomberg.com/news/articles/2026-01-25/lawsuit-claims-meta-can-see-whatsapp-chats-in-...
1•Brajeshwar•9m ago•0 comments

Website text invisible to AI agents and screenshots – For human eyes only

https://forhumaneyesonly.com/
1•halcdev•9m ago•0 comments

Did Edison accidentally make graphene in 1879?

https://arstechnica.com/science/2026/01/did-edison-accidentally-make-graphene-in-1879/
1•Brajeshwar•9m ago•0 comments

The Elias Material

https://eliasweb.org/AllSessions
1•vjulian•12m ago•0 comments

Show HN: Right Click – Customizable Context Menu(Popup for Android) for Firefox

https://addons.mozilla.org/en-US/firefox/addon/right-click-actions/
1•mcavdar•12m ago•0 comments

Eliza

https://en.wikipedia.org/wiki/ELIZA
1•chrisjj•13m ago•1 comments

Pruning Claude Code conversation history

https://brtkwr.com/posts/2026-01-22-pruning-claude-code-conversation-history/
1•freediver•13m ago•0 comments

A Critique of Modern SQL and a Proposal Towards a Simple and Expressive QL [pdf]

https://www.cidrdb.org/cidr2024/papers/p48-neumann.pdf
1•tanelpoder•14m ago•1 comments

Show HN: Generate the perfect kickoff prompt

https://vibeprompting.dev
1•relatedcode•17m ago•0 comments

Stop Separating People Problems from Engineering Problems

https://andrew.grahamyooll.com/blog/The-False-Dichotomy/
3•freediver•18m ago•0 comments

A wheel menu for all your shortcuts on Mac

https://www.wheelcmd.com/
1•nickljr•20m ago•0 comments

Kangaroo takes out Tour Down Under peloton

https://www.abc.net.au/news/2026-01-25/kangaroo-crashes-into-tour-down-under-peloton-as-jay-vine-...
1•Tomte•20m ago•0 comments

Genetic Data from over 20k U.S. Children Misused for 'Race Science'

https://www.nytimes.com/2026/01/24/us/children-genetics-race-science.html
2•DustinEchoes•21m ago•1 comments

A P-O-X On Both Your Houses: Reverse Engineering a 20 year RF protocol

https://zach-ennenga.medium.com/a-p-o-x-on-both-your-houses-reverse-engineering-a-20-year-rf-prot...
1•bsilvereagle•21m ago•0 comments

Show HN: Constela – JSON DSL for AI-generated UI with compile-time validation

1•yuu1ch13•23m ago•0 comments

Show HN: Netfence – Like Envoy for eBPF Filters

https://github.com/danthegoodman1/netfence
3•dangoodmanUT•23m ago•0 comments

Show HN: Open Computer-Animated Multivariable Calculus Course in 6 Languages

https://calculus.academa.ai/
2•sinaatalay•29m ago•0 comments

Show HN: Free PDF Editor by TechRex – client-side PDF editing, OCR, compression

https://pdffreeeditor.com/
1•Maaz-Sohail•33m ago•0 comments

Alex Honnold

https://en.wikipedia.org/wiki/Alex_Honnold
2•marklit•34m ago•0 comments

UN Declares That the World Has Entered an Era of 'Global Water Bankruptcy'

https://www.smithsonianmag.com/smart-news/united-nations-declares-that-the-world-has-entered-an-e...
67•pseudolus•34m ago•47 comments

Show HN: AI powered daily tracker of the US slide into authoritarianism

https://www.worstdaysofar.com/
2•locallyoptimal•37m ago•0 comments