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

Coding agents cannot remove complexity

https://12gramsofcarbon.com/p/agentics-coding-agents-cannot-remove
1•theahura•2m ago•0 comments

Show HN: Roblox Gakuran Guide and Wiki

https://gakuranguide.wiki/
1•cksmct•6m ago•0 comments

Tangleflow: Converts GitHub Actions workflows to tangled workflows and back

https://github.com/43081j/tangleflow
1•wertyk•10m ago•0 comments

Aurora DSQL: Scalable, Multi-Region OLTP

https://brooker.co.za/blog/2026/07/19/dsql-paper.html
1•mariuz•11m ago•0 comments

1 month and 60 models later

https://www.supcpu.com/research/1-month-and-60-models-later/
3•romellogoodman•11m ago•0 comments

Galloping Galaxies (1985-1986)

https://archive.org/details/s-01-e-01-part-one_20260604
2•petethomas•12m ago•0 comments

A Controlled Study of Attention-Only Transformers

https://arxiv.org/abs/2607.18363
1•E-Reverance•13m ago•1 comments

The first six ideas in machine learning

https://stochastic.blog/the-first-six-ideas-in-machine-learning/
1•Anon84•13m ago•0 comments

Never Enough

https://dark.ronacher.eu/2026/7/21/never-enough/
1•reasonableklout•14m ago•0 comments

Show HN: My Attempt of Ricing macOS

https://github.com/kushvinth/dotfiles
1•Kushvinth•14m ago•0 comments

Air Force conducts live-fire test for Collaborative Combat Aircraft program

https://www.acc.af.mil/News/Article-Display/Article/4547699/air-force-conducts-live-fire-test-for...
2•lxm•16m ago•0 comments

Nanbeige4.2-3B

https://huggingface.co/Nanbeige/Nanbeige4.2-3B
4•drgore•16m ago•0 comments

What's under your feet in New York City

https://www.youtube.com/watch?v=Iclf_JnPkKw
2•sheri•19m ago•0 comments

Ask HN: Why AI labs publish different benchmarks?

2•mzubairtahir•25m ago•0 comments

Salience Induction Against Multi-Hop RAG Agents: Threat and Defense

https://arxiv.org/abs/2607.17535
2•sbulaev•31m ago•0 comments

Running Laguna S 2.1 locally on Apple Silicon: 52 tok/s with 38.5 GB peak memory

https://github.com/tanishq-dubey/macos-laguna-s2.1
3•tdubey•35m ago•0 comments

Making Our Own Spectrogram

https://fasterthanli.me/articles/making-our-own-spectrogram
1•Jimmc414•36m ago•0 comments

Choosing GPT-5.6 Sol, Terra, or Luna in Codex

https://twitter.com/pvncher/status/2077708372363624894
1•gmays•36m ago•0 comments

Martin Picard's Mitochondrial Theory of Mind

https://www.quantamagazine.org/martin-picards-mitochondrial-theory-of-mind-20260717/
2•Jimmc414•37m ago•0 comments

R2 is now Generally Available (2022)

https://blog.cloudflare.com/r2-ga/
2•soheilpro•40m ago•1 comments

Starveling Rabblement

https://www.lrb.co.uk/the-paper/v48/n13/terry-eagleton/starveling-rabblement
1•prismatic•41m ago•0 comments

Show HN: Remote Bash Script Debugger

https://edebug.sh
1•ldom22•42m ago•1 comments

A mechanical light bulb from 1675 [video]

https://www.youtube.com/watch?v=0Y-9GbsS9Fg
1•fortran77•46m ago•0 comments

Volkswagen blocks Android devices running GrapheneOS from myVW App

https://www.autoevolution.com/news/volkswagen-bans-security-focused-grapheneos-cites-security-rea...
1•rvz•50m ago•0 comments

The AI Bubble Is No Ordinary Bubble

https://www.theatlantic.com/ideas/2026/07/ai-economy-stock-market/688004/
5•simonpure•52m ago•3 comments

Yubikey 5.8

https://www.yubico.com/press-releases/yubico-extends-passkeys-beyond-trusted-authentication-to-ve...
3•Lwrless•56m ago•0 comments

Déjà View: Someone already tried this

https://dejaview.bsct.so/
4•thunderbong•1h ago•2 comments

Late.sh – a command-line Clubhouse for computer people

https://late.sh/
4•itherseed•1h ago•1 comments

Dashrath Manjhi – Mountain Man

https://en.wikipedia.org/wiki/Dashrath_Manjhi
2•bch•1h ago•0 comments

America's AI labs are under threat from cheap Chinese rivals

https://economist.com/business/2026/07/21/americas-ai-labs-are-under-threat-from-cheap-chinese-ri...
2•andsoitis•1h ago•1 comments