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

Designing a Personal Pebble Watchface

https://www.jonashietala.se/blog/2026/06/26/designing_a_personal_pebble_watchface/
1•lawn•1m ago•0 comments

Auto-Charge Tracker makes Steam Controller move toward its charging dock

https://videocardz.com/newz/modder-makes-steam-controller-move-itself-to-the-charging-puck
1•LorenDB•7m ago•0 comments

The Ontological Consequences of AGI Autonomy

https://secondexpulsion.substack.com/p/the-apple-the-serpent-and-the-outside
1•cosmosjang•7m ago•0 comments

Cory Doctorow on the Right – and Wrong – Way to Criticize AI

https://jacobin.com/2026/06/ai-bubble-layoffs-workers-copyright
1•thunderbong•9m ago•0 comments

I was laid off from Meta and now I work at a butcher shop [video]

https://www.youtube.com/watch?v=oLzuO4FmcqE
2•mmarian•11m ago•0 comments

If your blog doesn't have an RSS feed, then it's not a blog

https://martinschuhmann.com/rss
2•speckx•12m ago•0 comments

The New Blub Paradox, Or: Why TypeScript Is a Poor Choice for the AI Era

https://www.iankduncan.com/engineering/2026-06-26-the-new-blub-paradox/
1•gnabgib•12m ago•0 comments

High School Student Journalists Investigate Flock

https://scotscoop.com/smile-youre-on-flock-how-san-mateo-county-built-a-network-of-mass-surveilla...
1•coloneltcb•15m ago•0 comments

How PgBouncer Works

https://www.augusteo.com/blog/how-pgbouncer-works/
1•linggen•18m ago•0 comments

Show HN: Run multiple instances of Codex(GUI) each with their own auth

https://github.com/ccheney/codex-multi-account
1•ccheney•18m ago•0 comments

Trump threatens 100% tariff on any country that imposes digital services tax

https://www.reuters.com/world/us/trump-threatens-100-tariff-any-country-that-imposes-digital-serv...
2•onemoresoop•19m ago•0 comments

Fireship was bought by a major investing firm

https://old.reddit.com/r/webdev/comments/1m8a2yx/fireship_was_bought_by_a_major_investing_firm/
1•mmarian•19m ago•1 comments

GPT-5.6 Preview System Card

https://deploymentsafety.openai.com/gpt-5-6-preview
2•blazespin•21m ago•0 comments

The SaaS Adventure (2015)

https://techcrunch.com/2015/02/01/the-saas-travel-adventure/
1•mooreds•23m ago•0 comments

Gossamer: a Rust-flavoured language with real goroutines and pause-free memory

https://gossamer-lang.org/
2•mwheeler•23m ago•0 comments

Expect RAM prices to stay high with Micron locking in deals for 5 years

https://www.gamingonlinux.com/2026/06/expect-ram-prices-to-stay-high-with-micron-locking-in-deals...
1•speckx•24m ago•2 comments

Slisp: Simple Lisp compiler (Linux/amd64)

https://github.com/skx/slisp
8•stevekemp•25m ago•1 comments

SpaceX's Starfall Demo Mission

https://www.spacex.com/launches/starfalldemo
6•caseysoftware•25m ago•0 comments

Hot Lotto Fraud Scandal (2017)

https://en.wikipedia.org/wiki/Hot_Lotto_fraud_scandal
1•badcryptobitch•25m ago•0 comments

Show HN: ToolPalace – 25 free browser tools that work offline, no sign-up

https://toolpalace.online
2•sohilpathan•27m ago•0 comments

Longer daylight linked to 4.4 minutes less sleep per extra hour of light

https://www.nature.com/articles/s44323-026-00092-2
1•kyriakosel•27m ago•2 comments

Show HN: Bsize yet Another Byte Size Crate

https://github.com/fast/bsize
1•tison•28m ago•0 comments

Show HN: Open protocol for agents to book vacation rentals direct from the host

https://vacationrentalprotocol.com/
2•Freezone•29m ago•0 comments

Made a Rust DB run spatial queries on gaming GPU RT cores, beating an H100

https://sedona.apache.org/latest/blog/2026/06/26/sedonadb-04-gpu-accelerated-spatial-joins/
2•dr-jia-yu•30m ago•0 comments

Show HN: Closing the public-key authenticity gap in our E2EE social network

https://mosslet.com/blog/articles/19
1•mosspigletdev•32m ago•0 comments

U.S. government will decide who gets to use GPT-5.6

https://www.washingtonpost.com/technology/2026/06/26/openai-says-us-government-will-vet-users-its...
54•alain94040•32m ago•24 comments

Murmur: Shared communication bus for your coding agents

https://github.com/instavm/murmur
1•handfuloflight•34m ago•0 comments

Poll: What's your primary AI coding agent/orchestrator Claude/Codex/Cursor, etc.?

1•jacobgold•36m ago•1 comments

Malware Insights: macOS Phexia Campaign

https://cookie.engineer/weblog/articles/malware-insights-macos-phexia-campaign.html
2•speckx•41m ago•0 comments

Show HN: AgentBrush – Your coding agent's missing tool: image generation

https://agentbrush.dev/
2•Yan4300•42m ago•0 comments