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 forward-deployed prediction error

https://www.cognitivefusion.systems/insights/glasswing-001
1•JohnsonSLC•3m ago•0 comments

Today's GitHub Incident – Issue with Pull Requests

https://www.githubstatus.com/incidents/f5pb5d5mr9yh
2•ilarum•3m ago•0 comments

A Fast Immutable Map in Go

https://lemire.me/blog/2026/03/29/a-fast-immutable-map-in-go/
1•surprisetalk•5m ago•0 comments

The future of work is playing a videogame

https://www.strangeloopcanon.com/p/the-future-of-work-is-playing-a-videogame
1•surprisetalk•5m ago•0 comments

Show HN: Skymap – a 3D galaxy catalog explorer in the browser via WebGPU

https://skymap.rulkens.com/
2•thereallex•6m ago•1 comments

Process Flow Engine for PC, Raspberry Pi, and ESP32

https://github.com/ewowi/projectMM
1•MrBuddyCasino•7m ago•0 comments

21 Days: A Founder Rebrand Compressed by AI

https://itsbariscan.substack.com/p/21-days-a-founder-rebrand-compressed
1•bariscan•7m ago•0 comments

Ctx – Do you remember? Persistent context for AI coding tools

https://github.com/ActiveMemory/ctx
1•parlakisik•9m ago•0 comments

Show HN: KubeRiva OMS – Open-source AI-native order management system

https://github.com/KubeRiva/OMS
1•kirankls2025•10m ago•0 comments

Rumors of my death are slightly exaggerated

6•CliffStoll•10m ago•0 comments

FBI investigating leaks to journalist who wrote explosive article on Kash Pate

https://www.ms.now/news/fbi-investigating-leaks-to-journalist-who-wrote-explosive-article-on-kash...
2•JumpCrisscross•11m ago•0 comments

David Baker on using protein design to tackle humanity's biggest challenges

https://www.existentialhope.com/podcasts/david-baker-using-ai-for-science-to-solve-humanitys-bigg...
1•martina_xhope•11m ago•1 comments

Apple's most powerful Mac Studio loses its last remaining RAM upgrade option

https://9to5mac.com/2026/05/05/apples-most-powerful-mac-studio-loses-its-last-remaining-ram-upgra...
2•rom16384•11m ago•0 comments

Lsyncd (Live Syncing Daemon) synchronizes local directories with remote targets

https://github.com/lsyncd/lsyncd
2•ankitg12•12m ago•0 comments

Your craft is obsolete: WiseTech staff in limbo as AI touted better than humans

https://www.theguardian.com/technology/2026/may/07/your-craft-is-obsolete-wisetech-staff-in-limbo...
1•cf100clunk•12m ago•0 comments

Agent Exchange – A2A discovery with real-time bidding for AI agents

https://github.com/open-experiments/agent-exchange
2•parlakisik•13m ago•0 comments

Why generating code isn't the same as code intelligence?

https://www.codeqa.ai/blog-post/why-generating-code-isnt-the-same-as-code-intelligence
2•CodeQA•13m ago•0 comments

Show HN: Meaning forks. SRT sees it

https://github.com/space-bacon/SRT
1•spacebacon•14m ago•0 comments

Show HN: Accept crypto payment in your business (only 1% fee, feedback welcome)

https://app.paycoinly.xyz/login
1•paycoinly•14m ago•2 comments

Am I Meant to Be Impressed?

https://www.wheresyoured.at/am-i-meant-to-be-impressed/
3•crescit_eundo•14m ago•0 comments

2026 California Billionaire Tax

https://en.wikipedia.org/wiki/2026_California_billionaire_tax
5•leonidasrup•15m ago•1 comments

CopilotKit raises $27M to build the Agentic FrontEnd Stack

https://techcrunch.com/2026/05/05/copilotkit-raises-27m-to-help-devs-deploy-app-native-ai-agents/
9•swiftlyTyped•15m ago•0 comments

Our Continuation of MkDocs

https://github.com/orgs/ProperDocs/discussions/33
5•serhack_•16m ago•0 comments

Dart Support in Cloud Functions for Firebase

https://firebase.blog/posts/2026/05/dart-functions-exp/
1•abraham•16m ago•0 comments

Ask HN: How are PMs keeping up with AI-accelerated engineering output?

2•rudolftheone•17m ago•1 comments

Circularity and Inconceivability: Why Philosophical Zombie Arguments Fail

https://sopathaye.substack.com/p/how-to-kill-a-philosophical-zombie
1•sopathaye•17m ago•0 comments

America's carpet capital: an empire and its toxic legacy

https://apnews.com/projects/pfas-forever-stained/
1•rawgabbit•17m ago•0 comments

We see something that works, and then we understand it

https://lemire.me/blog/2025/12/04/we-see-something-that-works-and-then-we-understand-it/
1•surprisetalk•20m ago•0 comments

Script performance profiler for PowerShell

https://github.com/nohwnd/Profiler
1•ankitg12•21m ago•0 comments

Startup matches Anthropic's Mythos on FreeBSD zero-days

https://aisle.com/blog/aisle-matches-anthropic-mythos-on-freebsd-zero-days
1•vibedev999•22m ago•0 comments