frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Ursa – a new Iceberg-first storage engine for Kafka

https://topicpartition.io/blog/ursa-a-new-lakehouse-first-storage-engine-for-kafka
2•enether•2m ago•0 comments

Applying "Programming Without Pointers" to an mbox indexer using Zig

https://simonhartcher.com/posts/2026-04-08-applying-programming-without-pointers-to-an-mbox-index...
1•mpweiher•3m ago•0 comments

Google: MCP Toolbox

https://github.com/googleapis/mcp-toolbox
1•danielmorozoff•3m ago•0 comments

South Africa's VALR Launches AI Service for Humans and AI Agents

https://mybroadband.co.za/news/industrynews/639519-valr-launches-ai-service-for-humans-and-ai-age...
1•DistantCl3ric•3m ago•0 comments

How Censorship Seized America

https://unherd.com/2026/04/how-censorship-seized-america/
1•barry-cotter•4m ago•0 comments

Claude Scholar

https://github.com/Galaxy-Dawn/claude-scholar
1•danielmorozoff•6m ago•0 comments

The acyclic e-graph: Cranelift's mid-end optimizer

https://cfallin.org/blog/2026/04/09/aegraph/
1•tekknolagi•7m ago•0 comments

Analysis of Virtual.1 by Bagolymadar

https://farena.in/reverse%20engineering/code%20virtualization/virtual-1-vm-solution/
1•speckx•9m ago•0 comments

Show HN: CodeJourney – Verifiable due diligence for code and IP

https://github.com/adaptive-scale/codejourney
1•debarshri•10m ago•0 comments

Scientists question CIA "Ghost Murmur" long-range heartbeat detection

https://www.scientificamerican.com/article/what-is-the-quantum-ghost-murmur-purportedly-used-in-i...
1•daniel_iversen•15m ago•0 comments

Llama LLM Network Feture

https://github.com/Jeffyjefchat/oracle-protocol
1•jeffy864567•15m ago•0 comments

Google rolls out Gmail end-to-end encryption on mobile devices

https://www.bleepingcomputer.com/news/google/google-rolls-out-gmail-end-to-end-encryption-on-mobi...
1•elsewhen•16m ago•0 comments

My Picture of the Present in AI

https://www.lesswrong.com/posts/WjaGAA4xCAXeFpyWm/my-picture-of-the-present-in-ai
1•speckx•17m ago•0 comments

Get Smart with Stupid Models

https://www.drewlyton.com/story/get-smart-with-stupid-models/
2•drew_lytle•18m ago•1 comments

Show HN: LLM-wiki LLM-compiled knowledge bases with multi-agent research v0.0.20

https://llm-wiki.net/
1•nvk•19m ago•0 comments

An open letter to 21 people I know who died

https://laylahughes.substack.com/p/an-open-letter-to-21-people-i-know
1•surprisetalk•20m ago•0 comments

"Love, Mum" – What AIs can't see about abuse

https://nataliercargill.substack.com/p/love-mum-what-ais-cant-see-about
2•surprisetalk•20m ago•0 comments

Covfefe (2017)

https://en.wikipedia.org/wiki/Covfefe
3•surprisetalk•20m ago•0 comments

The Myth of the Autism Epidemic

https://newsletter.humanprogress.org/p/the-myth-of-the-autism-epidemic
1•surprisetalk•20m ago•0 comments

AI-Powered Policing

https://www.washingtonpost.com/national-security/2026/04/10/ai-police-criminal-investigations/
1•dryadin•22m ago•0 comments

The hottest Apple product isn't what you think

https://www.cnn.com/2026/04/10/tech/apple-mac-mini-ai-openclaw
1•mooreds•22m ago•0 comments

Amazon to end support for older Kindles

https://www.bbc.com/news/articles/c98k91yy4z4o
3•akeck•22m ago•0 comments

Documentation is all you need

https://blog.unlegacy.ai/documentation-is-all-you-need/
1•Absonsonson•23m ago•1 comments

Silent YouTube Premium Price Increase?

https://old.reddit.com/r/youtube/comments/1sh8zxt/silent_youtube_premium_price_increase/
1•lordleft•23m ago•0 comments

A quantum-safe Bitcoin transaction scheme using only existing consensus rules

https://github.com/avihu28/Quantum-Safe-Bitcoin-Transactions/
1•giuliomagnifico•24m ago•0 comments

Radiant raises $300M to mass-produce portable nuclear reactors (2025)

https://www.radiantnuclear.com/blog/series-d-announcement/
1•mooreds•24m ago•0 comments

Raising a few $thousand to keep version control magical

https://github.com/magit/magit/issues/5555
1•xz18r•25m ago•0 comments

Women are getting most of the new jobs. What's going on with men?

https://text.npr.org/nx-s1-5773327
11•mooreds•25m ago•0 comments

Nezha: Run multiple AI coding agents across projects (Claude Code and Codex)

https://github.com/hanshuaikang/nezha
1•markhan-nping•25m ago•2 comments

Show HN: Zenovay, Web analytics with performance monitoring and revenue insights

https://app.zenovay.com/share/a1d7d3e7aeb24437871562f463eada27
1•valeriozen•27m ago•0 comments