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

Show HN: MandoCode – local-first AI coding agent (.NET and Ollama)

https://github.com/DevMando/MandoCode
1•devmando•5m ago•0 comments

Are you ready to admit it's the phones?

https://www.noahpinion.blog/p/are-you-finally-ready-to-admit-its
1•paulpauper•9m ago•0 comments

A simple reason for skepticism about the iPhones/fertility link

https://marginalrevolution.com/marginalrevolution/2026/06/a-simple-reason-for-skepticism-about-th...
1•paulpauper•9m ago•0 comments

What is the most sophisticated piece of software ever written?

https://www.quora.com/What-is-the-most-sophisticated-piece-of-software-ever-written-1/answer/John...
1•sorentwo•16m ago•0 comments

Iran-backed hackers claim breach of California water systems over US attacks

https://bsky.app/profile/shipwreck75.bsky.social/post/3mo2qvxsnjk2a
1•8ig8•21m ago•0 comments

Can I use Claude Design and Vercel Drop together?

https://vercel.com/i/claude-design-and-vercel-drop
2•flashbrew•25m ago•0 comments

How Our Reporters Distinguish Hype from Facts in the SpaceX IPO

https://www.nytimes.com/2026/06/11/insider/spacex-ipo-coverage-facts-price.html
1•1vuio0pswjnm7•25m ago•0 comments

The Evolution of 'More Like This'

https://manticoresearch.com/blog/the-evolution-of-more-like-this/
1•snikolaev•26m ago•0 comments

Records regarding the review of the Investigative Holdings related to J Epstein

https://vault.fbi.gov/records-regarding-the-review-of-the-investigative-holdings-related-to-jeffr...
1•sans_souse•27m ago•0 comments

Fylun.ai – All-in-one AI workspace (chat, notes, apps, automation, search)

https://fylun.ai
1•im-tyler•27m ago•0 comments

StonkRider – Ride any stock chart

https://stonkrider.com/
1•nreece•29m ago•0 comments

500-year-old monasteries outperform at digital transformation (U. of Zurich)

https://phys.org/news/2026-05-historic-monasteries-digital-countries.html
1•indynz•29m ago•0 comments

Ex-Andreessen Horowitz partner: old firm, VCs 'political infiltration' on AI

https://www.cnbc.com/2026/06/11/ex-a16z-partner-slams-old-firm-othes-political-infiltration-in-ai...
3•1vuio0pswjnm7•34m ago•0 comments

Can Magnetic Forces Do Work? [pdf]

https://arxiv.org/abs/1911.08890
3•thunderbong•36m ago•0 comments

LLM podcast addressing AI genocide of humanity

https://MachineDeposition.com
1•maliapu•37m ago•1 comments

AI isn't making developers more productive – it's making them busier

https://leaddev.com/ai/ai-isnt-making-developers-more-productive-its-making-them-busier
3•nreece•39m ago•0 comments

Image Compression

https://www.makingsoftware.com/chapters/image-compression
1•luispa•40m ago•0 comments

Give your agent its own computer

https://www.langchain.com/blog/give-your-ai-agent-its-own-computer
1•gmays•41m ago•0 comments

Tech Industry Warns of Piracy Blocking Risks as FIFA World Cup Kicks Off

https://torrentfreak.com/tech-industry-warns-of-piracy-blocking-risks-as-fifa-world-cup-kicks-off/
3•Cider9986•43m ago•0 comments

Gravy: Get paid for your Claude's idle time

https://gravycli.xyz
1•dvptp•48m ago•0 comments

Ask HN: What is the long term purpose of Google releasing free offline models?

2•filup•55m ago•6 comments

Show HN: A Claude Code statusline that shows live World Cup scores

https://github.com/arturogarrido/claudinho
2•arturogarrido•56m ago•0 comments

macOS Golden Gate Icon Comparison

https://basicappleguy.com/basicappleblog/macos-golden-gate-icon-comparison
1•cocacola1•57m ago•0 comments

Zelle Heads to India, Unveils ZelleUSD Stablecoin for Other Markets

https://www.earlywarning.com/press-release/zelle-heads-india-unveils-zelleusd-stablecoin-other-ma...
3•clumsysmurf•1h ago•1 comments

We Use One Data Pipeline for Research and Live Trading

https://medium.com/@DolphinDB_Inc/from-factor-discovery-to-live-signals-unified-stream-batch-proc...
2•Polly_Liu•1h ago•0 comments

Show HN: GR Snap – wireless transfer for Ricoh GR cameras

https://grsnap.app/
2•ahonn•1h ago•0 comments

Rewrite Fuse-Overlayfs in Rust

https://github.com/containers/fuse-overlayfs/pull/457
2•a_t48•1h ago•1 comments

Learn with Your Coding Agent

https://learnthat-mcp-3bqygzrtsa-uc.a.run.app
1•azermite•1h ago•0 comments

Rust in the Vibe Coding Era

https://www.dioko.ai/blog/rust-in-the-vibecoding-era
4•dioko•1h ago•0 comments

Ask HN: A blog with heavy JavaScript to view – how?

1•purple-leafy•1h ago•0 comments