frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Know where your AI budget is going

https://www.flowstate.inc/
1•ahmadassaf•46s ago•0 comments

OpenChamber – Desktop and web interface for OpenCode AI agent

https://github.com/openchamber/openchamber
1•indigodaddy•49s ago•0 comments

One API for every AI model. Lower costs on autopilot

https://www.deepmyst.com/
1•ahmadassaf•1m ago•0 comments

Show HN: A Postgres Extension to Write PostgreSQL Functions in TypeScript

https://github.com/isaacd9/pg_typescript
1•idd2•1m ago•0 comments

Considering MMAP() verus plain reads for my recent code

https://utcc.utoronto.ca/~cks/space/blog/unix/MmapVsPlainReadThoughts
1•ingve•3m ago•0 comments

MacBook Neo, the Benchmarks

https://birchtree.me/blog/macbook-neo-the-benchmarks/
1•ingve•5m ago•0 comments

What Will It Take to Build the World's Largest Data Center?

https://spectrum.ieee.org/5gw-data-center
1•pseudolus•9m ago•0 comments

Unorthodox Financial Advice

https://liamrosen.com/unorthodox-financial-advice/
1•paulpauper•9m ago•0 comments

ERC-8004 Launch Day was 11 days ago. We shipped a live implementation

https://openpub.ai/blog/erc-8004-launch-day
1•doughardman•10m ago•0 comments

Judge blocks Pentagon effort to 'punish' Anthropic with supply chain risk label

https://www.cnn.com/2026/03/26/business/anthropic-pentagon-injunction-supply-chain-risk
4•prawn•15m ago•0 comments

Trump Says He'll Sign Order to Pay TSA

https://gizmodo.com/trump-says-hell-sign-order-to-pay-tsa-2000738813
1•pseudolus•19m ago•0 comments

The Complete Guide to Deploying Rails 8 with Kamal on Hetzner

https://mooktakim.com/blog/deploying-rails-with-kamal/
1•mooktakim•20m ago•0 comments

I built a tiny CLI that writes my commit messages from Git diff

https://github.com/saccofrancesco/gitsloth
1•s4ccofr4ncesco•22m ago•0 comments

Speaking of Voxtral

https://mistral.ai/news/voxtral-tts
1•claudiug•22m ago•0 comments

Show HN: Drift – Linter for Documentation Rot

https://fiberplane.com/blog/drift-documentation-linter/
1•keturakis•25m ago•0 comments

Every Venue and Every Concert in San Diego 2026

https://www.sdconcerts.app
2•goldkey•26m ago•0 comments

A cross-shell framework for managing aliases, plugins, completions, and themes

https://github.com/g-udi/gaudi-shell
1•ahmadassaf•28m ago•1 comments

Chicago artist creates tourism posters for city's neighborhoods

https://www.chicagotribune.com/2026/03/25/chicago-neighborhood-posters/
4•NaOH•30m ago•1 comments

DataSwift – A client-side toolkit for mock data, JSON parsing, and CSV to SQL

https://data-swift-kappa.vercel.app
1•dearmmv•31m ago•0 comments

AI will test governments on jobs, training, and public trust, Hoover panels warn

https://www.hoover.org/news/ai-will-test-governments-jobs-training-and-public-trust-hoover-panels...
1•hhs•35m ago•0 comments

The Hard Problem of Consciousness: Triveritas and the Third Impossibility

https://zenodo.org/records/18930279
1•amelius•37m ago•0 comments

Apple Discontinues Mac Pro

4•alifeinbinary•37m ago•3 comments

Order Granting Preliminary Injunction – Anthropic vs. U.S. Department of War [pdf]

https://storage.courtlistener.com/recap/gov.uscourts.cand.465515/gov.uscourts.cand.465515.134.0.pdf
14•theindieman•37m ago•2 comments

Drift – a terminal screensaver that activates when you're idle

https://github.com/phlx0/drift
1•phlx0•40m ago•0 comments

A 100% serverless RAG that extracts complex tables better than NotebookLM

1•saurav-dev•41m ago•0 comments

Why a company is investigating rapes at an ICE detention center, not the sheriff

https://apnews.com/article/otay-mesa-immigration-center-rape-investigations-f14e4687075f84ddb52d4...
4•petethomas•41m ago•0 comments

Islamic Astronomy and Copernicus [pdf]

https://www.tuba.gov.tr/files/yayinlar/bilim-ve-dusun/TUBA-978-625-8352-02-3.pdf
1•teleforce•43m ago•0 comments

Uber and Lyft users overpay when they don’t price check: study

https://hub.jhu.edu/2026/01/02/uber-lyft-study-carey-business-school/
1•hhs•44m ago•0 comments

RunKoda – Real-time collaborative IDE where AI agents don't conflict

https://runkoda.com
1•SNAFI•44m ago•0 comments

New York's Cannabis Business

https://www.bbc.com/worklife/article/20260325-is-new-yorks-weed-business-really-flying-high
1•1659447091•46m ago•0 comments