frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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

C++26: Standard Library Hardening – Sandor Dargo's Blog

https://www.sandordargo.com/blog/2026/05/13/cpp26-library-hardening
1•rbanffy•1m ago•0 comments

Clinics scramble for experimental Revolution Medicines pancreatic cancer drug

https://www.reuters.com/legal/litigation/us-cancer-clinics-scramble-get-experimental-revolution-m...
1•JumpCrisscross•5m ago•0 comments

Chinese memory module makers ramp up production as DDR5 breakthrough hits market

https://www.scmp.com/tech/tech-trends/article/3353464/chinese-memory-module-makers-ramp-productio...
1•yogthos•6m ago•0 comments

Mado: Fast Markdown linter written in Rust

https://github.com/akiomik/mado
1•nateb2022•8m ago•0 comments

Localmaxxing

https://tomtunguz.com/localmaxxing/
1•gmays•9m ago•2 comments

Head of Microsoft's Israel branch to step down after inquiry into deal with IDF

https://www.theguardian.com/technology/2026/may/12/microsoft-head-israel-step-down
2•rbanffy•11m ago•0 comments

Postgres FDW: Pushdown is a negotiation

https://clickhouse.com/blog/postgres-fdw-pushdown-negotiation
3•4mog•13m ago•0 comments

Show HN: Watch a neural net discover molecules by arguing with itself

https://randman444.github.io/meta-molecule/
1•cmaicurious•15m ago•0 comments

Show HN: Design.md Generator

https://chromewebstore.google.com/detail/ai-design-taste-designmd/peclkdlolmcclhhgpoehpikgknbmkknc
6•novateg•16m ago•0 comments

A $300M+ Deal Could Hand Anthropic Control Over Rival SDKs

https://entrepreneurloop.com/anthropic-stainless-acquisition-300m-developer-tools-deal/
1•vipshek•16m ago•0 comments

GitHub Actions Security Checklist for Supply Chain Attacks

https://corgea.com/learn/github-actions-security-checklist
1•asadeddin•16m ago•0 comments

Claude for Legal

https://github.com/anthropics/claude-for-legal
5•Einenlum•19m ago•0 comments

Community is the whole job search

https://taylordesseyn.substack.com/p/community-is-the-whole-job-search
2•mooreds•19m ago•0 comments

Pigs could end the transplant waiting list

https://bigthink.com/science-tech/pigs-could-end-the-transplant-waiting-list/
5•lschueller•22m ago•1 comments

Show HN: I built a Web-Scraper API that is 6-7x more efficient than current ones

https://scrapewithruno.com/
3•polaritymaking•22m ago•0 comments

Organ Harvesters

https://cinemasojourns.com/2026/05/14/organ-harvesters/
3•jjgreen•24m ago•0 comments

The Missing Manual: Digital Sovereignty

https://berjon.com/digital-sovereignty/
2•doener•25m ago•0 comments

What It Will Take to Make AI Sustainable

https://www.wired.com/story/what-it-will-take-to-make-ai-sustainable/
2•cdrnsf•26m ago•0 comments

Google DeepMind Workers Vote to Unionize over Military AI Deals

https://www.wired.com/story/google-deepmind-workers-vote-to-unionize-over-military-ai-deals/
6•cdrnsf•26m ago•0 comments

An Engineer's Post Protesting Laptop Surveillance Is Going Viral Inside Meta

https://www.wired.com/story/meta-employee-protest-mouse-tracking-surveillance-ai-training/
4•cdrnsf•27m ago•0 comments

Show HN: Full Stack HQ – Claude.md and Agent Stack for Claude Code

https://github.com/sabahattink/antigravity-fullstack-hq
3•sabahattink•28m ago•0 comments

Sprite Scaling on the Master System: Building the New on the Ruins of the Old

https://nicole.express/2026/zoom-zoom.html
2•ndr42•29m ago•0 comments

Microsoft starts canceling Claude Code licenses

https://www.theverge.com/tech/930447/microsoft-claude-code-discontinued-notepad
7•speckx•30m ago•0 comments

The Agent Security Stack: Transport, Identity, Policy, Runtime

https://www.keycard.ai/blog/agent-security-stack/
1•mooreds•30m ago•0 comments

The data is abundantly clear: the EU Digital Markets Act is working

https://www.osnews.com/story/144954/the-data-is-abundantly-clear-the-eu-digital-markets-act-is-wo...
2•ndr42•31m ago•0 comments

Minimal Structures

https://chefcinnamon.github.io/memo/posts/minimal-structures/
3•cnmon•33m ago•0 comments

Our Partnership with Z.ai

https://developer.puter.com/blog/puter-zai-annoucement/
3•ent101•33m ago•0 comments

Upwork unable to payout contracts for over 24h

https://status.upwork.com/
5•cr4zy•35m ago•1 comments

Justice Dept. Aims to Denaturalize Ex-Marine for Sex Crime

https://www.nytimes.com/2026/05/14/us/denaturalization-citizen-sex-crime.html
3•JumpCrisscross•37m ago•0 comments

Steve Yegge's Google Platforms Rant (2011)

https://gist.github.com/chitchcock/1281611
2•nvader•41m ago•0 comments