frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•6mo 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•6mo 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•6mo 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).

Super-Flat ASTs

https://jhwlr.io/super-flat-ast/
1•mpweiher•53s ago•0 comments

Kiss vs. DRY in Infrastructure as Code: Why Simple Often Beats Clever

https://rosesecurity.dev/2025/11/14/kiss-versus-dry-iac.html
1•prognostikos•1m ago•0 comments

A lost idea can be a lost universe

https://rishi.monster/posts/a-lost-idea-can-be-a-lost-universe/
1•wawhal•1m ago•0 comments

Things You Shouldn't Leave in the Shed This Winter

https://www.countryliving.com/gardening/garden-ideas/a69611445/things-to-not-put-garden-shed-winter/
1•mooreds•1m ago•0 comments

Show HN: Octopii – a distributed runtime written in Rust

https://github.com/octopii-rs/octopii
1•joeeverjk•2m ago•0 comments

Glitches on video calls linked to real-world decisions

https://www.theregister.com/2025/12/04/glitchy_video_calls_research/
1•radeeyate•2m ago•0 comments

What makes a Platform Team work [audio]

https://www.swarmia.com/podcast/mason-jones-zapier/
1•mooreds•4m ago•0 comments

Show HN: PyTorch-World v0.1.0 — Build & Train World Models

https://github.com/ParamThakkar123/pytorch-world
1•paramthakkar•4m ago•0 comments

Memory Crunch Hits PCs: Dell Hikes Prices 20%, Lenovo from January 2026

https://www.trendforce.com/news/2025/12/05/exclusive-memory-crunch-hits-pcs-dell-hikes-prices-15-...
1•akyuu•4m ago•0 comments

New discovery: The 'sacred boundary' surrounding Stonehenge

https://www.dw.com/en/new-discovery-the-sacred-boundary-surrounding-stonehenge/a-75039682
1•politelemon•5m ago•0 comments

SDA Church pays fines for 11 inmates at Nsawam Prisons

https://www.adomonline.com/sda-church-pays-fines-for-11-inmates-at-nsawam-prisons/
1•sipofwater•5m ago•1 comments

The Last Year Before AGI and How to Build Software Teams That Survive the Shift

https://www.tenmas.tech/post/2026-the-last-year-before-agi-and-how-to-build-software-teams-that-s...
1•mooreds•6m ago•0 comments

Show HN: I kept forgetting my supplements while cutting, so I built an app

https://apps.apple.com/us/app/gymdose-supplement-tracker/id6756020237
1•baransel•6m ago•1 comments

GrapheneOS is the only Android OS providing full security patches

https://grapheneos.social/@GrapheneOS/115647408229616018
1•akyuu•8m ago•0 comments

Beeple unleashes uncanny robot canines at Art Basel Miami Beach

https://www.theartnewspaper.com/2025/12/04/beeple-robot-dogs-elon-musk-art-basel-miami-beach
1•cs702•10m ago•0 comments

The Forge Roblox Calculator

https://theforge-calculator.com/
1•thecrecipe•11m ago•0 comments

How I discovered a hidden microphone on a Chinese NanoKVM

https://telefoncek.si/2025/02/2025-02-10-hidden-microphone-on-nanokvm/
3•ementally•12m ago•0 comments

Biological LLM Evo 2: Getting Started

https://predictbiolabs.com/evo2/
1•reinvent42•14m ago•0 comments

When square pixels aren't square

https://alexwlchan.net/2025/square-pixels/
1•surprisetalk•15m ago•0 comments

Montaigne's Epistemology

https://www.jenn.site/montaignes-epistemology/
1•surprisetalk•15m ago•0 comments

What did you do [video]

https://www.youtube.com/watch?v=bC-8y2R6IxI
1•surprisetalk•15m ago•0 comments

Because I Wanted To

https://aaronfrancis.com/2024/because-i-wanted-to-12c5137c
2•Kerrick•16m ago•1 comments

Testing Absurd Queues for AI Workloads

https://leblancfg.com/trying-absurd-postgres-workflows.html
1•leblancfg•18m ago•0 comments

A Risk of Cognitive Convenience

https://davidepstein.substack.com/p/a-risk-of-cognitive-convenience
2•RickJWagner•18m ago•0 comments

React2Shell (CVE-2025-55182): A Log4Shell Moment for the Front End Ecosystem

https://securitylabs.datadoghq.com/articles/cve-2025-55182-react2shell-remote-code-execution-reac...
3•birdculture•24m ago•0 comments

Show HN: KnockKnock – Circular video calls that bring you closer, faster(macOS)

https://apps.apple.com/ca/app/knockknock/id6740499661?mt=12
1•HamounKarami•28m ago•1 comments

A Dao of Web Design (2000)

https://alistapart.com/article/dao/
1•Kerrick•31m ago•0 comments

A New Best Practice for User Friendly 404 Page Design?

https://kerrick.blog/posts/2025/a-new-best-practice-for-user-friendly-404-pages/
1•Kerrick•31m ago•0 comments

Artificial Womb Technology: Survey of 750 Researchers

3•biostark•34m ago•1 comments

Show HN: FastAPI Matrix Admin – Zero-config secure admin panel with cyberpunk UI

https://github.com/rasinmuhammed/fastapi-matrix-admin
1•rasinmuhammed•35m ago•0 comments