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

Giving Minecraft Infinite Time to Beat Itself [video]

https://www.youtube.com/watch?v=9t2fV52jMA8
1•nstents•54s ago•0 comments

Jellyfin 12.0

https://jellyfin.org/posts/jellyfin-release-12.0/
1•0xC0ncord•1m ago•0 comments

Terence Tao – Reflections on the Foundations of Interpretability Workshop

https://www.youtube.com/watch?v=AXlif6z9a2A
1•twoodfin•2m ago•0 comments

Show HN: Froogle – a search engine portal in one HTML file

1•scosman•4m ago•0 comments

Vagrant is approaching EOL. No more "Docker for VMs"

https://developer.hashicorp.com/hcp/docs/vagrant/hcp-vagrant-eol
1•stasge•6m ago•0 comments

Mathematical Cranks

https://en.wikipedia.org/wiki/Mathematical_Cranks
1•_ttg•7m ago•0 comments

DUPR (pickeball rating system) outage: 3rd day and no explanation

https://www.reddit.com/r/Pickleball/comments/1w9iroh/the_dupr_situation_its_bad/
1•gbin•7m ago•0 comments

My business partner sent a 5K vibe-coded PR that he didn't even test

https://ycj.bearblog.dev/ai-again/
2•yhcj•9m ago•0 comments

Anthropic Said to Walk Away from $6B Decart Acquisition

https://www.bloomberg.com/news/articles/2026-09-08/anthropic-said-to-walk-away-from-6-billion-dec...
2•mfiguiere•10m ago•0 comments

Monero is our most-used crypto at NanoGPT

https://reddit.com/r/Monero/comments/1w9my20/monero_is_our_mostused_crypto_at_nanogpt_were_now/
1•Cider9986•10m ago•1 comments

OpenAI and the Wiki Incident

https://thezvi.substack.com/p/openai-and-the-wiki-incident
1•Khaine•10m ago•0 comments

Release pnpm 11.26 · pnpm/pnpm

https://github.com/pnpm/pnpm/releases/tag/v11.26.0
1•kyisaiah47•11m ago•0 comments

Show HN: Termjack – blackjack in the terminal with a built-in strategy trainer

https://github.com/eddietex/termjack
1•esdrasevt•13m ago•1 comments

LLM Guided Evolution for Circle Packing: Breaking 10 Packomania Records for $28

https://arxiv.org/abs/2609.05093
1•practicalsystem•14m ago•0 comments

Show HN: Gorilla Quake

https://github.com/duncancarroll/gorillaquake
2•duncancarroll•17m ago•0 comments

After 9/11, Documents Suggest New Yorkers Were Misled About Air Quality

https://www.nytimes.com/2026/09/07/nyregion/sept-11-air-quality-cancer.html
1•littlexsparkee•22m ago•1 comments

An audit of the Bible and the God in it

https://medium.com/freedomofthought/an-audit-of-the-bible-and-the-god-in-it-88410af31682
2•raynchad•29m ago•2 comments

Divergent betacoronavirus with functional furin cleavage site in S.American bats

https://www.nature.com/articles/s41467-026-77599-6
1•ceejayoz•34m ago•0 comments

World Models from Scratch Part 1: Tokenizing Super Mario Land

https://www.youtube.com/watch?v=KyqrUA25424
2•jadidbourbaki•35m ago•0 comments

A Multiplayer Pong over SSH

https://antics.gg/ssh
1•eric_khun•37m ago•0 comments

Throng – A new way to browse Bluesky

https://throng.cee.wtf/
2•twotwoz•40m ago•1 comments

I've factored the RSA keys of a Certificate Authority from the 90s

https://mcpherrin.ca/2026/09/07/rsa.html
47•ahlCVA•40m ago•3 comments

Ask HN: Simple Question

1•sgroppino•41m ago•0 comments

Agentdesktop

https://github.com/agentdesktop-dev/agentdesktop
1•ilevine•42m ago•1 comments

We put an LLM in a PostgreSQL analyzer, then stopped letting it decide truth

https://blog.elevarq.com/elevarq-1-0
1•frankheikens•42m ago•1 comments

Show HN: Dol – Local-first Markdown notes that sync to your own CouchDB

https://dol.praxostudio.com/
1•ydh0110•46m ago•0 comments

Show HN: Browse 27 years of movie ticket stubs in ThreeJS

https://gardnermcintyre.com/stubs/
1•zebomon•47m ago•0 comments

Show HN: Vertumnus – printable posters of farmers' market produce seasonality

https://vertumnus.fyi
1•perspectivezoom•49m ago•0 comments

Outrageously Small Neural Networks: Emergent Basic Reasoning at 6,616 tok/SEC [pdf]

https://huggingface.co/gdiamos/amx-reasoning-v1-instruct/blob/main/paper.pdf
4•Anon84•49m ago•3 comments

The Ultra-Scale Playbook

https://huggingface.co/spaces/nanotron/ultrascale-playbook
1•Anon84•53m ago•0 comments