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

Why Scheme?

https://goeteia.dev/why
1•edfsadfer•57s ago•0 comments

Symbolic Artificial Intelligence

https://en.wikipedia.org/wiki/Symbolic_artificial_intelligence
1•ijidak•1m ago•0 comments

AI models in 'surreal' dialect mixing poetic language and tech bro jargon

https://www.theguardian.com/technology/2026/sep/15/syd-barrett-ai-chat-language-poetic-tech-bro-j...
1•danielmorozoff•3m ago•0 comments

Show HN: Context Freshness Ledger – a tiny schema for reviewable agent memory

https://github.com/chengyixu/context-freshness-ledger
1•Wilson_Xu•3m ago•0 comments

Novel Particle Beam Could Challenge Einstein's Theory of Gravity

https://ethz.ch/en/news-and-events/eth-news/news/2026/09/novel-particle-beam-could-challenge-eins...
1•geox•6m ago•0 comments

FBI boarded Texas-bound oil tanker to investigate cyberattack

https://www.cbsnews.com/news/coast-guard-fbi-board-oil-tanker-texas/
1•virgulino•6m ago•1 comments

NASA-backed scientists turn plastic waste into edible cookies

https://www.sciencedaily.com/releases/2026/09/260912220033.htm
1•danielmorozoff•7m ago•0 comments

"Filmmaker" suing PassThePopcorn may be banned user out for revenge

https://arstechnica.com/tech-policy/2026/09/filmmaker-suing-passthepopcorn-may-be-banned-user-out...
1•shscs911•10m ago•0 comments

William Buckland's Theology of Geology

https://www.historytoday.com/archive/great-debates/william-bucklands-theology-geology
1•Petiver•11m ago•0 comments

Broken Windows, Abstractions and the Cost of Always Keeping Things Simple

https://pgilmartin.substack.com/p/broken-windows-abstractions-and-the
1•snikolaev•13m ago•0 comments

Show HN: ZenTabTimer, an HTML timer where browser favicon is the timer

https://github.com/kevinpondmind/ZenTabTimer
1•kevin_kraft•13m ago•0 comments

Inference Is the Last LLM Moat

https://www.vincentschmalbach.com/inference-is-the-last-llm-moat/
1•vincent_s•16m ago•0 comments

We struggled with DevOps, so built a open source agentic platform just for this

1•abmuhammadhamza•17m ago•0 comments

From Academia to Alignment

https://millicosm.substack.com/p/from-academia-to-alignment
3•danielmorozoff•20m ago•0 comments

The Agent Economy Has No Auditor

https://twitter.com/TruenceHQ/status/2100065538730807533
1•Kambizmalik•23m ago•0 comments

Will farm animals always suffer?

https://worksinprogress.co/issue/will-farm-animals-always-suffer/
1•gmays•23m ago•0 comments

Origin stories: idioms using 'walk'

https://www.suzannearnold.com/blog/origin-stories-idioms-using-walk
2•DanielVZ•25m ago•0 comments

Intelligent Interaction Techniques

https://arxiv.org/abs/2609.16295
1•azhenley•25m ago•0 comments

Cisco Email Gateway SQL Injection Yields Unauthenticated Root (CVSS 9.8)

https://sec.cloudapps.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-esa-inj-2b...
1•iamsyr•27m ago•0 comments

The Configuration Complexity Clock

http://mikehadlow.blogspot.com/2012/05/configuration-complexity-clock.html
2•sssilver•28m ago•0 comments

Build domain-specific harness and long-horizon agents with OS Python framework

https://github.com/cayu-dev/cayu
3•zamir_akimbekov•29m ago•0 comments

I Wanted to Stay in Canada So I Learned French

https://macleans.ca/longforms/i-wanted-to-stay-in-canada-so-i-learned-french/
2•cvhc•34m ago•0 comments

Occamy-1.0: Open Pareto-frontier 35B intelligence for co-work

https://arxiv.org/abs/2609.11977
1•donk8r•43m ago•0 comments

Anthropic Has Some Alignment Problems

https://thezvi.substack.com/p/anthropic-has-some-alignment-problems
2•gmays•43m ago•0 comments

Anthropic CEO renews call for AI slowdown as Nvidia's urges acceleration

https://www.theguardian.com/technology/2026/sep/15/anthropic-nvidia-ceos-ai
2•andsoitis•44m ago•0 comments

Important Notice on CoinEx's Orderly Cessation of Operations

https://www.coinex.com/en/announcements/detail/53539656293908
1•Bluestein•47m ago•0 comments

Ex150-17: The Unbearable Lightness of Being

https://www.exfatloss.com/p/ex150-17-the-unbearable-lightness
2•paulpauper•47m ago•0 comments

The Bad Guy with an AI Named Claude

https://thezvi.substack.com/p/the-bad-guy-with-an-ai-named-claude
1•paulpauper•48m ago•0 comments

Any markets strategies for B2B companies, how to approach them

1•Vineetyadav2•51m ago•0 comments

Vercel Labs

https://vercel.com/labs
1•MehrdadKhnzd•51m ago•0 comments