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

Show HN: Chatlens – Search and browse your ChatGPT and Claude chats offline

https://github.com/david-g-3654/chatlens
1•davai-g•1m ago•0 comments

Is Alibaba going back on their words on qwen3.8 27B? this page is now 404

https://modelscope.cn/models/Qwen/Qwen3.8-27B
1•yakisuragi•2m ago•0 comments

Greatest Concept Albums

https://www.rollingstone.com/music/music-lists/best-concept-albums-1234604040/
2•kaycebasques•5m ago•0 comments

The web's newest weapon against AI scrapers is a font

https://arstechnica.com/ai/2026/08/new-font-turns-ordinary-webpages-into-nonsense-for-ai-scrapers/
1•gpi•7m ago•0 comments

Proofs and Prompts

https://proofsandprompts.com/
1•nill0•11m ago•0 comments

The Machine Is My Session Band, but It Cannot Hear Me

https://expulvisinteractive.com/press/the-machine-is-my-session-band/
1•forgeforward•11m ago•0 comments

Stunning Eclipse turns daylight into darkness across Europe

https://www.bbc.co.uk/news/resources/idt-72837d31-18c9-43be-9863-fbd1bec82c7d
1•andsoitis•13m ago•0 comments

Whoop replacement noop 10.0 released

https://github.com/ryanbr/noop
2•mp3geek•15m ago•1 comments

Show HN: Interspectr – automated interview prep generated from a job posting

https://interspectr.com/
2•ShinApekusay•17m ago•0 comments

ICE plans to equip agents with gloves that can deliver electric shocks

https://www.bbc.com/news/articles/c20d292gdp4o
1•decimalenough•21m ago•0 comments

Show HN: A local RAG desktop app: piFlow

https://github.com/ifoxhz/piflow
1•ifoxhz•21m ago•1 comments

NagaAI – Cheaper AI Aggregator (Like Poe, OpenRouter, etc.)

https://naga.ac
1•peter_d_sherman•22m ago•0 comments

AMD Instinct MI455X Deep Dive: CDNA 5 Marks the Next Era of Instinct

https://www.servethehome.com/amd-instinct-mi455x-deep-dive-cdna-5-marks-the-next-era-of-instinct/
1•pella•26m ago•0 comments

Jarvis – autonomous assistant for real-world tasks

https://jarvis.foundation/
2•modinfo•27m ago•0 comments

Schema - new language for serialized data in C++/C#/Golang and Rust

https://github.com/mas-bandwidth/schema/blob/main/README.md
1•gafferongames•27m ago•0 comments

Jeff Dean has been in talks for a $10B valuation for his new AI startup

https://www.businessinsider.com/former-google-exec-jeff-dean-valuation-for-new-ai-startup-2026-8
1•nsoonhui•29m ago•0 comments

Vercel Sandbox Now Runs on Vercel Managed Images

https://vercel.com/changelog/vercel-sandbox-managed-images
1•0xedb•32m ago•0 comments

What Is AI Governance and How to Operationalize It?

https://www.etherionconsulting.com/blog/what-is-ai-governance-and-how-to-operationalize-it/
1•koanvai•36m ago•0 comments

Show HN: Daedalus, Artful D2 Diagrams

https://asmat.ca/blog/what-makes-good-diagrams/
1•sotilrac•37m ago•0 comments

Show HN: PhotoBook.studio – Get your photos off the internet into a book

https://photobook.studio/
2•nadermx•38m ago•0 comments

My Homelab Got Hacked – A Postmortem

https://phunky.cafe/my-homelab-got-hacked/
2•birdculture•40m ago•0 comments

Conductor for Windows/Linux

https://maestro-build.com/
1•Entropnt•44m ago•1 comments

Why Disney Plus Failed and Content Monetization Is Art

https://s-1.vercel.app/posts/the-failure-of-disney-monetizing/
1•Taikhoom2010•44m ago•0 comments

Return to the 'Trust Us' Days of Central Banking? No Thanks

https://www.bloomberg.com/opinion/articles/2026-08-12/the-fed-ecb-and-boe-must-communicate-better...
1•petethomas•48m ago•0 comments

Richest to Profit in Trump's Capital Gain Tax Ideas for Midterms

https://www.bloomberg.com/news/articles/2026-08-12/richest-to-gain-with-trump-s-capital-gain-tax-...
2•petethomas•50m ago•0 comments

The ESPHome Starter Kit is here

https://esphome.io/blog/2026/08/12/the-esphome-starter-kit-is-here/
2•balloob•51m ago•0 comments

California Uber, Lyft drivers win union recognition

https://www.cbsnews.com/losangeles/news/california-uber-lyft-drivers-win-union-recognition/
8•lxm•53m ago•1 comments

The Mothra Telescope Captured the Faint Aftermath of a Star's Death

https://www.nytimes.com/2026/08/12/science/mothra-telescope-helix-nebula.html
1•wglb•53m ago•0 comments

Ask HN: What should I do with my W10 laptop?

1•minimal3•55m ago•1 comments

Why Are Scientists So Bad at Naming Things? [video]

https://www.youtube.com/watch?v=luh0NLhcMrI
1•ivanjermakov•56m ago•0 comments