frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

GNU Ddrescue 1.30 Released

https://lists.gnu.org/archive/html/info-gnu/2026-01/msg00001.html
1•guiambros•2m ago•0 comments

Why I Cold-Called President Trump at 4:30 in the Morning

https://www.nytimes.com/2026/01/03/insider/trump-interview-venezuela-nyt-reporter.html
1•notmysql_•5m ago•1 comments

A Practical guide to building a parser in Go

https://gagor.pro/2026/01/a-practical-guide-to-building-a-parser-in-go/
1•todsacerdoti•7m ago•0 comments

China Urges United States to Release Venezuelan President Maduro

https://medium.com/@omshree0709/china-urges-united-states-to-release-venezuelan-president-maduro-...
1•OmShree0709•9m ago•0 comments

Show HN: Model2data – generate realistic synthetic data from data models

https://github.com/JB-Analytica/model2data
1•jarichb•16m ago•0 comments

How Twitch Tamed a Million Lines of TypeScript

https://www.joshribakoff.com/blog/lint-snapshots/
1•joshribakoff•17m ago•0 comments

Perp DEXs emerge as crypto's strongest growth story in 2025

https://altcoindesk.com/perspectives/expert-opinions/perp-dexs-emerge-as-cryptos-strongest-growth...
1•AishwaryaTiwari•18m ago•0 comments

How does a president becomes a dictator? By executive order

https://augustafreepress.com/news/john-whitehead-how-does-a-president-becomes-a-dictator-by-execu...
3•allgirl•21m ago•2 comments

Why Simple Everyday Objects Are Impossible to Make [video]

https://www.youtube.com/watch?v=pj0ze8GnBKA
1•areoform•22m ago•0 comments

No-Ham-anuary: a retrospective on reducing my intake of processed meat

https://tomaytotomato.com/no-ham-anuary/
1•tomaytotomato•22m ago•0 comments

NAS file sharing: Why I use both NFS and SMB protocols (2025)

https://www.xda-developers.com/why-use-both-nfs-and-smb-nas-for-file-sharing/
1•sipofwater•22m ago•2 comments

Skimfeed has changed it's url linking

1•markx2•26m ago•0 comments

MCP for a Coffee Machine... Worked!

https://archestra.ai/blog/brew-by-ai
1•motakuk•30m ago•0 comments

TS/JS Type-safe thread pool multithreading using Web Workers

https://github.com/imramkrishna/thready-js
1•handfuloflight•32m ago•0 comments

Show HN: A minimal demo showing coherence collapses when state is transported

https://github.com/jspchp63/rcircuit-phase-engine
1•jspchp63•33m ago•0 comments

I asked an AI to create "Unhackable Code". It gave me this. I'm scared

1•VOIDMAKINA•33m ago•2 comments

Show HN: certgrep – The Certificate Transparency Search Engine

https://certgrep.sh/
2•juxhindb•35m ago•0 comments

AMD Stole Intel's Future: The Untold x86-64 Story [video]

https://www.youtube.com/watch?v=WyX8TO3awfw
1•tosh•36m ago•0 comments

Manifesto claiming responsibility for terror attack on energy infrastructure [D]

https://www.berliner-zeitung.de/news/stromterror-in-berlin-das-bekennerschreiben-im-wortlaut-li.1...
1•FrojoS•36m ago•0 comments

Signal Contingency Plan (DeltaChat)

https://signal-contingency-plan.info/
1•xeonmc•36m ago•2 comments

DeGoogled Phones Reviews

https://tuta.com/blog/degoogled-phones
6•nreece•37m ago•0 comments

Directional Searching for Light Dark Matter with Quantum Sensors [pdf]

https://journals.aps.org/prl/abstract/10.1103/cwx5-2n1y
1•thunderbong•39m ago•0 comments

Show HN: I Built the Redis GUI Tool as an Alternative to RedisInsight - Redimo

https://www.redimo.dev
1•shh6155•45m ago•0 comments

Watching myself say things I would never say. Deepfake menace we must confront

https://www.theguardian.com/commentisfree/2026/jan/05/deepfakes-youtube-menace-yanis-varoufakis
3•defrost•45m ago•1 comments

ECB’s digital euro project faces decisive vote in 2026

https://www.ft.com/content/99a7b61b-c5df-4794-8c5f-2e3acd291333
1•nutjob2•51m ago•0 comments

Decorative Cryptography

https://www.dlp.rip/decorative-cryptography
27•todsacerdoti•56m ago•5 comments

Unifying QFT and GR Through Topologically Protected Gauge Theory

https://www.academia.edu/145737035/The_Renormalization_of_Gravity_Resolving_the_Goroff_Sagnotti_D...
1•MohskiBroskiAI•56m ago•0 comments

FL Studio Linux Setup Guide

https://github.com/Torbuntu/fl-studio-linux-setup
1•luckys•58m ago•0 comments

The Death and Rebirth of Programming – The Phoenix Architecture

https://aicoding.leaflet.pub/3malrv6poy22a
2•kiyanwang•1h ago•0 comments

The Naibbe cipher: encrypts Latin and Italian as Voynich-like ciphertext

https://www.youtube.com/watch?v=ByARtG-GUPo
1•omega3•1h ago•1 comments