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

The Ferrari of Espresso Machines Is Fueling a Hot Resale Market

https://www.nytimes.com/2026/04/20/dining/la-marzocco-espresso-machine.html
2•mitchbob•2m ago•1 comments

Voice to Instrument

1•starkiron•3m ago•0 comments

Wormhall

http://iladelf.org/wormhall/index.html
1•madprops•3m ago•0 comments

Claude Desktop Works with OpenCode Go

https://gist.github.com/avarayr/a9a35354aa6d7d8430ce0c27cd9aff3f
1•mikamika83•4m ago•0 comments

Mathematician Collapses All Functions to One Weird Formula [video]

https://www.youtube.com/watch?v=hwtqJaS42xk
2•darepublic•13m ago•0 comments

The SF Group Chat

https://twitter.com/daniel_dhawan/status/2041913527045386447
1•nowflux•15m ago•0 comments

It's not just one thing – it's another thing

https://techcrunch.com/2026/04/20/ai-writing-its-not-just-this-its-that-barrons/
1•davikr•16m ago•0 comments

Show HN: I built an AI that assigns YOU tasks

https://www.pause.build/
1•chaidhat•36m ago•1 comments

Apple iPhone texting changes: they fixed everything and changed nothing

https://webmatrices.com/post/apple-iphone-texting-changes-they-fixed-everything-and-changed-nothing
1•bishwasbh•36m ago•0 comments

Show HN: pg_roast – A Postgres extension that harshly judges your database

https://github.com/samirketema/pg_roast
1•samirketema•39m ago•1 comments

Homeland Security is making "smart glasses" to collect intelligence on Americans

https://www.kenklippenstein.com/p/exclusive-ice-glasses
3•c420•42m ago•0 comments

Red Queen Hypothesis

https://en.wikipedia.org/wiki/Red_Queen_hypothesis
4•Hooke•42m ago•0 comments

FanDuel wants to carve a sports niche in the prediction market business

https://www.cnn.com/2026/04/19/tech/fanduel-prediction-markets-app
1•1659447091•44m ago•0 comments

"You're mad Lad figured it out " – OpenClaw creator [video]

https://www.youtube.com/watch?v=7rzYDM6vMtI
2•0xAntonioo•46m ago•0 comments

String Seed of Thought: Prompting for Distribution-Faithful, Diverse Generation

https://pub.sakana.ai/ssot/
1•hardmaru•46m ago•0 comments

Show HN: Palmier – bridge your AI agents and your phone

https://github.com/caihongxu/palmier
1•caihongxu•48m ago•0 comments

pnpm v11 is almost here

https://twitter.com/pnpmjs/status/2045901598006690244
1•bpierre•50m ago•0 comments

Futuristic analyser tool? – what is this – omg

https://rogmash.neocities.org/3drein
1•rogmash•52m ago•0 comments

KMDS, now with natural language ingestion and search

https://github.com/rajivsam/kmds
1•rsva•59m ago•1 comments

Amazon behind on jobs promised for funding to build Virginia headquarters

https://www.washingtonpost.com/dc-md-va/2026/04/20/amazon-h2q-virginia-headquarters/
2•reaperducer•1h ago•0 comments

Digital Ecosystems: Interactive Multi-Agent Neural Cellular Automata

https://pub.sakana.ai/digital-ecosystem/
2•hardmaru•1h ago•0 comments

A Pragmatic Approach to Thorny People Problems

https://witnesstodestruction.blogspot.com/p/a-pragmatic-approach-to-thorny-people.html
2•basilikum•1h ago•0 comments

San Francisco Solved Metro Vandalism with One Neat Trick

https://www.theatlantic.com/ideas/2026/04/fare-gate-society-bart/686868/
7•mmcclure•1h ago•2 comments

KV Cache Compression 900000x Beyond TurboQuant and Per-Vector Shannon Limit

https://arxiv.org/abs/2604.15356
42•EGreg•1h ago•20 comments

Technological Phylogenetics: Modeling Tech Evolution Like Git (Paper)

https://zenodo.org/records/19673425
1•xsytrance•1h ago•1 comments

What Does a VPN Protect You From

https://anonymous-proxies.net/posts/what-does-a-vpn-protect-you-from/
2•sabrinacarpen•1h ago•0 comments

Show HN: Real-time visualization of Claude Code agent orchestration

https://github.com/patoles/agent-flow
1•daco•1h ago•0 comments

Show HN: NeuG – High-performance Embedded graph DB, one line to serve

2•robeenly•1h ago•0 comments

Front End Is Edge Computing

https://edge.jmaleonard.com/01-frontend-is-edge-computing.html
1•jmaleonard•1h ago•0 comments

Show HN: Weekly Log, Old-school journaling social media

1•bobbies-treats•1h ago•0 comments