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

Is there still a functioning team behind replicate.com?

1•fqye•1m ago•0 comments

Dash0 Acquires Polar Signals

https://www.dash0.com/blog/dash0-acquires-polar-signals
1•ishener•5m ago•0 comments

Eigen stuffs interactive web app

https://eigshow.web.app/
1•cecinuga•5m ago•0 comments

How Watermarking Works

https://typebulb.com/u/antypica/how-watermarking-text-works/full
1•grp000•15m ago•1 comments

Handling HTTP 429 errors in LLM APIs

https://medium.com/@jakemill54/troubleshooting-llm-api-429-errors-in-production-fc665a93480f
2•WavyPeng•15m ago•0 comments

A kernel that just runs a NES emulator

https://github.com/vmartinv/nek
1•likemouse•16m ago•0 comments

Want to know who Google thinks is evil?

https://twitter.com/bob_burrough/status/2089024095967170651
3•frizlab•16m ago•0 comments

Databricks Genie Cost Control: How to Set Budgets and Block Usage

https://medium.com/databrickscommunity/databricks-genie-cost-control-how-to-set-budgets-and-block...
1•protmaks•17m ago•0 comments

Man Bought a Font

https://unstory.eu/wgc/
1•rhabarba•17m ago•0 comments

Agentic Engineering at Zalando

https://engineering.zalando.com/posts/2026/08/agentic-engineering-at-zalando-a-snapshot.html
1•NeutralForest•20m ago•0 comments

Don't use an LLM for your README.md

https://til.andrew-quinn.me/posts/don-t-use-an-llm-for-your-readme-md/
4•hiAndrewQuinn•21m ago•3 comments

Why PDF extraction for RAG breaks, and one approach to make it verifiable

https://github.com/cernodatainc/cernodata
1•nattanko•28m ago•1 comments

OpenRaster, format for exchange of layered raster images between image editors

https://www.openraster.org/
2•mimasama•33m ago•0 comments

The rebellion against data centers is growing

https://spectator.com/article/rebellion-against-data-centers-growing/
2•01-_-•33m ago•0 comments

Show HN: Bratify – Live speech into charlie xcx brat

https://baggiest.github.io/bratify/
1•Baggie•33m ago•0 comments

The Three AI Pills

https://thezvi.substack.com/p/the-three-ai-pills
1•talivision•33m ago•0 comments

Binance gave Russia data on IT worker in EU, now jailed over Ukraine donations

https://meduza.io/feature/2026/08/17/kriptobirzha-binance-peredala-rossiyskim-silovikam-dannye-ob...
3•Klaster_1•35m ago•0 comments

The CPU Comeback Is Upon Us

https://spectrum.ieee.org/ai-cpu-comeback
1•50kIters•36m ago•0 comments

Show HN: Verifying that an auto-submitted job application arrived

https://aiapplyd.com/
1•sneefle•41m ago•0 comments

Translating poems on Seoul Metro's platform screen doors

https://www.substack-bahn.net/p/translating-poems-on-seoul-metros
2•decimalenough•41m ago•0 comments

Skyrim with Rust

https://github.com/realfakenerd/OpenSkyrim
2•libertas_quae_s•42m ago•0 comments

Ukraine says it hit Russian rocket centre linked to Starlink-style network

https://www.reuters.com/business/aerospace-defense/ukraine-says-it-hit-russian-rocket-centre-link...
4•vrganj•44m ago•0 comments

Show HN: Desktopcolors.com – A museum for solid background colors of classic OS

https://desktopcolors.com
2•vlowrian•45m ago•0 comments

Expertise Can't Be Automated: Why Resilience Still Needs Humans

https://resilienceinsoftware.org/news/11560646
4•zdkaster•46m ago•0 comments

GPU-Based Device Fingerprinting

https://shaderghost.gg/
1•avastel•48m ago•0 comments

Why books donʼt work (2019)

https://andymatuschak.org/books/
3•groomlake•48m ago•1 comments

Secret Claude tracker shocks users after Anthropic's anti-surveillance stance

https://arstechnica.com/tech-policy/2026/07/anthropic-outed-for-claude-tracker-that-secretly-moni...
2•mgh2•48m ago•0 comments

Every student is cheating with AI

https://ben.page/cheating
2•jer0me•49m ago•0 comments

Orbs and Jellyware [video]

https://www.youtube.com/watch?v=FfCCEZ00RFw
1•tosh•51m ago•0 comments

Evaluating coding models on 40 real tickets

https://medium.com/@joeymills19/public-coding-benchmarks-dont-match-my-repo-so-i-built-my-own-305...
1•AnneWodell•51m ago•0 comments