frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

If you want to understand any society, look at what it creates

https://notes.philippdubach.com/0009
1•7777777phil•3m ago•0 comments

Vibe Engineering in 2026.1

https://me.0xffff.me/vibe_engineering_202601.html
1•c4pt0r•3m ago•0 comments

The Date Data Type in Oracle vs. PostgreSQL

https://hexacluster.ai/blog/the-date-data-type-in-oracle-vs-postgresql/
1•avivallssa•4m ago•1 comments

Show HN: Pharos – "yarn why" but shows the full chain and what to update (Rust)

https://github.com/vaskort/pharos
1•vaskort•4m ago•0 comments

Train Your Tenacity

https://playtechnique.io/blog/train-your-tenacity.html
1•gwynforthewyn•6m ago•1 comments

Estimation of Variance by a Recursive Equation (pdf, 1969)

https://ntrs.nasa.gov/api/citations/19690028796/downloads/19690028796.pdf
1•slow_typist•6m ago•1 comments

Why sandboxing coding agents is harder than you think

https://martinalderson.com/posts/why-sandboxing-coding-agents-is-harder-than-you-think/
2•jnord•8m ago•1 comments

Frankenwine: Multiple Personas in a Wine Process

https://nullprogram.com/blog/2026/01/19/
1•zdw•9m ago•0 comments

ChatVault – Local-first semantic search for WhatsApp (Rust and WASM)

https://github.com/marcoshernanz/ChatVault
1•marcoshernanz•9m ago•1 comments

Show HN: Cmdarg, argument parsing for bash scripts

https://github.com/akesterson/cmdarg
1•akesterson•11m ago•0 comments

James Prinsep, polymath who deciphered Kharosthi and Brahmi scripts

https://en.wikipedia.org/wiki/James_Prinsep
1•like_any_other•11m ago•0 comments

Even citing NSF funded research is an ACM premium feature

https://win-vector.com/2026/01/19/even-citing-nsf-funded-research-is-an-acm-premium-feature/
1•jmount•12m ago•0 comments

GLM-4.7-Flash 30B-A3B MoE

https://xcancel.com/zai_org/status/2013261304060866758
1•Alifatisk•12m ago•0 comments

The average 50-something American is now worth $1.4M

https://www.usatoday.com/story/money/2026/01/19/average-net-worth-1-million-50-year-olds/88202093...
5•lxm•13m ago•3 comments

The US is buying icebreakers from Finland

https://www.bbc.co.uk/news/articles/c0q48d71ke8o
3•perihelions•15m ago•0 comments

Systems design 3: LLMs and the semantic revolution

https://apenwarr.ca/log/20251120
1•gjadi•15m ago•0 comments

Anthropic's Interpretability Research Blog

https://transformer-circuits.pub/
1•philipfweiss•16m ago•1 comments

Show HN: EV-QA-Framework – Open-source battery testing with ML anomaly detection

https://github.com/remontsuri/EV-QA-Framework
1•remontsuri•17m ago•1 comments

How much can a city take?

https://www.theverge.com/policy/864195/minneapolis-ice-invasion-organizing-immigration
2•HotGarbage•17m ago•0 comments

Why file systems are here to stay for agents

https://archil.com/post/why-file-systems-are-here-to-stay
1•huntaub•18m ago•0 comments

Pasture – Qualify Your Signups

https://www.usepasture.com/
1•rogutkuba•19m ago•1 comments

Turn off your Firestore automatic indexes

https://jaredkhan.com/blog/firestore-indexes
1•krinn_silver•19m ago•1 comments

3D Print: loud and compact emergency whistle

https://www.thingiverse.com/thing:2933021/files
1•rendx•20m ago•0 comments

Intel's 18A claims 50% lower power than Apple's 3nm [video]

https://www.youtube.com/watch?v=8RrA5SVfC_g
2•thelastgallon•20m ago•0 comments

DiffusionBlocks: Block-Wise Neural Network Training

https://arxiv.org/abs/2506.14202
1•E-Reverance•21m ago•0 comments

Show HN: Whirligig – Tinder for Gigs

https://whirligig.live
1•idiocache•22m ago•0 comments

Morally judging famous and semi-famous people

https://marginalrevolution.com/marginalrevolution/2026/01/morally-judging-famous-and-semi-famous-...
2•7777777phil•23m ago•0 comments

Digital Transformation: Why Some Companies Succeed and Others Fail

https://dynamic.broadtechnologies.site/digital-transformation-why-some-companies-succeed-and-othe...
1•Silvaaaa•24m ago•0 comments

The Rise and Fall of the American Monoculture

https://www.wsj.com/business/media/american-pop-culture-history-ce8672f1
1•jnord•24m ago•0 comments

Asus Confirms It Won't Launch Phones in 2026, May Leave Android Altogether

https://www.pcmag.com/news/asus-confirms-it-wont-launch-phones-in-2026-may-leave-android-altogeth...
2•jnord•25m ago•0 comments