frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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

The Internet can't stop watching Figure AI's humanoid robots handling packages

https://arstechnica.com/ai/2026/05/the-internet-cant-stop-watching-figure-ais-humanoid-robots-han...
1•vintagedave•1m ago•1 comments

AI dev tools: Cost, ROI, and budgeting for 2026

https://www.hitechies.com/ai-developer-tools-cost-roi-budget-2026/
1•dhakalster•2m ago•0 comments

24/7 Renewables Are Ending Fossil Fuel Reliability

https://www.forbes.com/sites/kensilverstein/2026/05/20/how-247-renewables-are-ending-fossil-fuel-...
1•xbmcuser•2m ago•0 comments

Only 17% of all 64-bit Integers are products of two 32-bit integers

https://lemire.me/blog/2026/05/22/only-17-of-all-64-bit-integers-are-products-of-two-32-bit-integ...
2•chmaynard•5m ago•0 comments

Show HN: Stainless replacement – paste OpenAPI, get TS/Python/Go SDK ZIP in 1.5s

https://sdk-gen-mvp.vercel.app
1•ianymu•6m ago•0 comments

Opaque Types in Python

https://blog.glyph.im/2026/05/opaque-types-in-python.html
1•ingve•6m ago•0 comments

A local-first multimodal knowledge platform for managing entities

https://github.com/mat-mgm/humanist
1•triska•7m ago•0 comments

I keep bouncing off the Scheme language

https://www.sicpers.info/2026/05/i-keep-bouncing-off-the-scheme-language/
1•ingve•9m ago•0 comments

Funding Rate Arbitrage on Crypto Perpetuals: Implementation and Backtest

https://medium.com/@DolphinDB_Inc/profiting-from-perpetuals-implementing-a-funding-rate-arbitrage...
2•CrazyTomato•10m ago•0 comments

Why Svelte Is Better Than React in the Agentic Era

https://zackwebster.com/blog/why-svelte-is-better-than-react-in-the-ai-era
1•thunderbong•11m ago•0 comments

Fixing WebRTC data-channels head-of-line blocking with RFC-8260

https://pion.ly/blog/sctp-interleaving/
1•JoTurk•12m ago•0 comments

LeoMoon Wiki-Go is a modern, feature-rich, databaseless flat-file wiki platform

https://wikigo.leomoon.com/
2•Tomte•15m ago•0 comments

Spotify and UMG announce licensing deal to allow AI covers

https://www.billboard.com/pro/spotify-and-umg-strike-licensing-deal-for-ai-covers-remixes/
1•reinder•16m ago•0 comments

Show HN: I created a disk usage explorer CLI

https://github.com/evilmarty/duex
1•evilmarty•16m ago•0 comments

CodeAlta – a terminal workspace for agentic coding

https://github.com/CodeAlta/CodeAlta
1•bj-rn•17m ago•0 comments

How Unfair Is the Coin?

https://ankitg.me/blog/2025/01/06/unfair-coins.html
1•sebg•19m ago•0 comments

OpenXiv – Open-source preprint server on AT Protocol that federates to Bluesky

https://openxiv.net/
2•ddavidich•20m ago•0 comments

We should get rid of average CPU utilization

https://www.theocharis.dev/blog/why-we-should-get-rid-of-average-cpu-utilization/
4•JeremyTheo•26m ago•1 comments

What's New in Flutter 3.44

https://blog.flutter.dev/whats-new-in-flutter-3-44-b0cc1ad3c527
1•divan•28m ago•0 comments

Trump's Endgame Is Surrender

https://www.theatlantic.com/international/2026/05/trump-surrender-iran-endgame/687252/
7•_tk_•31m ago•5 comments

SEO Survival Kit – Claude Code Plugin for Core Update Recovery

https://github.com/maxschottke-spec/seo-survival-kit
1•maxschottkespec•31m ago•0 comments

RuView – WiFi DensePose: See Through Walls with WiFi (Scam Alert)

https://github.com/deletexiumu/wifi-densepose
2•reconnecting•39m ago•0 comments

Open Accountants

https://www.openaccountants.com/
1•openaccountants•40m ago•1 comments

A nightmare experience: Trying to open a bank account with Bank of America

https://www.maroonmed.com/a-nightmare-experience-trying-to-open-a-bank-account-with-bank-of-america/
2•erdoc69•42m ago•0 comments

Trump pulls back AI order over fears it could slow US technology

https://apnews.com/article/trump-ai-executive-order-ee318f35acc8a2c43e47f3ebf26cb459
3•isaacfrond•44m ago•0 comments

Bytewax: Stream processing library built using Python and Rust

https://github.com/bytewax/bytewax
1•rzk•47m ago•0 comments

Odroid H-series is going 10 GbE (ODROID-H5)

https://www.hardkernel.com/shop/odroid-h5/
2•chr•48m ago•0 comments

Deepfakes Tore a High School Apart

https://www.404media.co/radnor-high-school-pennsylvania-ai-deepfakes-child-sexual-abuse-material/
22•Brajeshwar•49m ago•7 comments

Moss: Self-Evolution Through Source-Level Rewriting in Autonomous Agent Systems

https://arxiv.org/abs/2605.22794
2•Timofeibu•54m ago•0 comments

UniFi 5G Backup

https://blog.ui.com/article/introducing-unifi-5g-backup
1•jpalomaki•55m ago•1 comments