frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Shading Languages Symposium 2026 content now available

https://www.khronos.org/events/shading-languages-symposium-2026
1•pjmlp•52s ago•0 comments

eBPF the Hard Way

https://feyor.sh/blog/ebpf-the-hard-way/
1•todsacerdoti•3m ago•0 comments

I found a useful Git one liner buried in leaked CIA developer docs

https://spencer.wtf/2026/02/20/cleaning-up-merged-git-branches-a-one-liner-from-the-cias-leaked-d...
1•spencerldixon•6m ago•0 comments

The sale of xAI comes with tax, financial and legal benefits for investors

https://www.reuters.com/business/finance/sale-xai-comes-with-tax-financial-legal-benefits-xai-spa...
2•Zigurd•7m ago•1 comments

Show HN: A native macOS client for Hacker News, built with SwiftUI

https://github.com/IronsideXXVI/Hacker-News
1•IronsideXXVI•7m ago•0 comments

Show HN: LexPrep – Open-source toolkit for linguistic stimulus preparation

https://github.com/sajjad-mazaheri/lexprep
1•Sajjad_m•7m ago•0 comments

Federated Identity vs. Single Sign-On: Key Differences

https://auth0.com/blog/federated-identity-vs-single-sign-on-key-differences/
1•andychiare•9m ago•0 comments

Show HN: Export and resume Claude Code sessions

https://github.com/wunderlabs-dev/claudebin.com
2•vtemian•9m ago•0 comments

ggml.ai joins Hugging Face

https://twitter.com/ggerganov/status/2024839991482777976
1•tosh•10m ago•0 comments

Show HN: Open-source MCP servers making every country's law searchable by AI

https://ansvar.eu/open-law
1•Aesir89•12m ago•0 comments

Why too much phosphorus in America's farmland is polluting the country's water

https://theconversation.com/why-too-much-phosphorus-in-americas-farmland-is-polluting-the-country...
2•PaulHoule•12m ago•0 comments

At protocol has a new website

https://atproto.com/
1•articsputnik•13m ago•1 comments

Code Reviews in the Age of AI

https://senkorasic.com/articles/rethinking-code-reviews
1•senko•13m ago•0 comments

Zed Split Diffs Are Here

https://zed.dev/blog/split-diffs
3•k2enemy•13m ago•0 comments

Train AI Models with Unsloth and Hugging Face Jobs for Free

https://huggingface.co/blog/unsloth-jobs
1•ibobev•13m ago•0 comments

Show HN: Claude Code plugin – Telegram notifications when it needs your input

https://github.com/mikhailrojo/claude-telegram-notifications
1•Mikheyrojo•13m ago•0 comments

Building the Worst Vi Emulation for My Mail Client

https://xnacly.me/posts/2026/the-worst-vim-emulation-for-my-mail-client/
1•ibobev•14m ago•0 comments

A Humanly Curated List of Personal and Independent Blogs

https://blogroll.org/
2•TigerUniversity•14m ago•0 comments

What is f(x) ≤ g(x) + O(1)? Inequalities With Asymptotics

https://jamesoswald.dev/posts/bigoinequality/
1•ibobev•14m ago•0 comments

Foundry:Deploy and manage full observability stack on Linux with a single binary

https://github.com/SigNoz/foundry
2•nageshbansal•14m ago•1 comments

MangoJelly Solutions for FreeCAD

https://www.youtube.com/channel/UCUWhaOxsRk_5oPPq00_Y7Dw
1•aw-engineer•14m ago•0 comments

We're offering free Claude Code Max ($200/mo for 6 months)

1•quangpl•14m ago•0 comments

A refined collection of Hypervelocity Engineering components

https://github.com/microsoft/hve-core
1•tomconte•15m ago•0 comments

Ggml.ai joins Hugging Face to ensure the long-term progress of Local AI

https://github.com/ggml-org/llama.cpp/discussions/19759
33•lairv•18m ago•3 comments

Show HN: Claude Code Open – AI Coding Platform with Web IDE and 37 Tools

https://github.com/kill136/claude-code-open
1•694623326•19m ago•0 comments

OpenCode seems to be taking off

https://twitter.com/PowersetRes/status/2024563156354207768
1•patrickdevivo•19m ago•0 comments

Federal Reserve use of AI coding

https://www.federalreserve.gov/newsevents/speech/barr20260217a.htm
1•polyglotfacto•20m ago•1 comments

Show HN: A geometric analysis of Chopin's Prelude No. 4 using 3D topology

https://github.com/jimishol/cholidean-harmony-structure/blob/main/docs/03-case-study-chopin-prelu...
1•jimishol•20m ago•1 comments

Show HN: Clawbernetes – Replace kubectl with conversation (Rust)

https://github.com/clawbernetes/clawbernetes
1•redclaw•20m ago•0 comments

Sites on Neocities

https://neocities.org/browse
1•TigerUniversity•21m ago•0 comments