frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

I sequenced my genome at home

https://iwantosequencemygenomeathome.com/
2•vikrum•1m ago•0 comments

Show HN: Sampletext.store/ We built a dumb web shop and we cannot look away

https://sampletext.store/
2•smrtfckrr•2m ago•0 comments

Show HN: Video as Code for Agents

https://github.com/zPy52/video-as-code-for-agents
2•dontoni•2m ago•0 comments

Show HN: I made a Chrome extension for sharing news article quotes as images

https://www.peekd.app/
3•herrj•3m ago•0 comments

Critical cPanel and WHM bug exploited as a zero-day, PoC now available

https://www.bleepingcomputer.com/news/security/critical-cpanel-and-whm-bug-exploited-as-a-zero-da...
3•Brajeshwar•4m ago•0 comments

Show HN: Hexlock – Replace PII in text with fake data that has the same format

https://github.com/ttarvis/hexlock
2•lemaudit•4m ago•0 comments

Show HN: Flocklist, minimalist graph-based task tracker

https://flocklist.app/?onboarding=true
3•ilqr_jb•4m ago•0 comments

An opinionated, interactive map of the open standards in the data world

https://www.data-landscape.com/
2•simonharrer•6m ago•0 comments

Show HN: Shuck – a fast shell linter written in Rust

https://github.com/ewhauser/shuck
3•ewhauser421•6m ago•0 comments

Ways in which GenAI has changed the way I write code so far

https://lengrand.fr/ways-in-which-genai-has-changed-my-coding-so-far/
2•speckx•9m ago•0 comments

FeurStagram: Open-source Android Instagram patched with distraction blocking

https://github.com/jean-voila/FeurStagram
2•jean-voila•10m ago•0 comments

How to make SSE token streams resumable, cancellable, and multi-device

https://zknill.io/posts/everyone-said-sse-token-streaming-was-easy/
2•zknill•10m ago•0 comments

PyTorch Lightning project quarantined by PyPI

https://pypi.org/project/lightning/
4•grepLeigh•10m ago•3 comments

Whose Trust Is It Anyway? Configuration Boundaries in AI Development Tools

2•kundanydv•11m ago•0 comments

Agents can now create Cloudflare accounts, buy domains, and deploy

https://blog.cloudflare.com/agents-stripe-projects/
1•thm•12m ago•0 comments

Show HN: Agent-relay – multi-agent workflows that learn from past runs

https://github.com/srijansk/agent-relay
1•srijanskt•12m ago•0 comments

Vinted Serves Personalised Search Autocomplete

https://vinted.engineering/2026/04/22/personalized-search-autocomplete/
1•debesyla•13m ago•0 comments

Show HN: Pyinc – a pull-based incremental query kernel for Python

https://github.com/Brumbelow/pyinc
1•brumbelow•13m ago•0 comments

Speed vs. stability: the divide between product and engineering

https://sofiakodar.github.io/posts/senseofurgency/
3•adunk•14m ago•0 comments

Try – a lightweight, generic retry library for Go with backoff and jitter

https://github.com/nodivbyzero/try
2•nodivbyzero•14m ago•0 comments

AssemblyAI launches Voice Agent API – an end-to-end voice agent pipeline

https://www.assemblyai.com/blog/introducing-our-voice-agent-api
1•martinschweiger•15m ago•0 comments

ChatGPT will tell you the truth after it stops mattering

https://thismightbetrue.substack.com/p/i-asked-chatgpt-who-its-protecting
1•BrendanNestor•17m ago•0 comments

Recovering 86-DOS from Paper

https://jscarsbrook.me/doshistory/
1•stephen-hill•18m ago•0 comments

Zed 1.0 is out – the end of Electron-based IDEs

https://medium.com/@arthurpro/zed-ide-is-1-0-and-the-electron-era-just-ended-d04c89b42e7b
2•arthurpro•18m ago•2 comments

Solar Eclipse Map

https://dojo.amcharts.com/solar-eclipses/
1•WillPostForFood•20m ago•1 comments

Japan Is Building Cardboard Suicide Drones

https://www.404media.co/japan-cardboard-drones-air-kamuy/
5•Brajeshwar•24m ago•0 comments

How Unicode Collation Works (2025)

https://www.theobeers.com/collation-for-dummies/
10•theobeers•25m ago•1 comments

Show HN: Give 9B model persistent suffering states and leave it alone overnight

https://ninjahawk.github.io/blog/posts/local-llm-psychological-states.html
1•ninjahawk1•28m ago•0 comments

A fully static Terraform registry

https://davidguerrero.fr/blog/fully-static-terraform-registry/
1•davguerrero•30m ago•1 comments

The Complete Claude Setup Checklist: 72 Steps from Default to Power User

https://medium.com/@alirezarezvani/the-complete-claude-setup-checklist-72-steps-from-default-to-p...
7•jungard•32m ago•0 comments