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 Alignment Problem in Your Government

https://kunnas.com/articles/alignment-problem-in-your-government
1•ekns•2m ago•0 comments

My audio interface has SSH enabled by default

https://hhh.hn/rodecaster-duo-fw/
1•hhh•2m ago•0 comments

Microsoft's Wave of Executive Departures

https://www.theverge.com/tech/917361/microsoft-executive-departures-notepad
1•cdrnsf•3m ago•0 comments

TIPSv2: Advancing Vision-Language Pretraining with Enhanced Patch-Text Alignment

https://gdm-tipsv2.github.io/
1•gmays•5m ago•0 comments

LLMs are pretty good at making slideshows now

https://iter.ca/post/llm-slideshows/
1•smitop•6m ago•0 comments

Show HN: ffmpeg-render-pro – Parallel video rendering with live dashboard

https://www.npmjs.com/package/ffmpeg-render-pro/v/1.2.0?activeTab=readme
1•beeswaxpat•9m ago•0 comments

RLMs process inputs up to two orders of magnitude beyond model context windows

https://github.com/alexzhang13/rlm
1•blumomo•10m ago•0 comments

Support Put, Patch, and Delete in HTML Forms

https://alexanderpetros.com/triptych/form-http-methods
1•acabal•10m ago•0 comments

Solve identity consistency problem for foundational image models

https://www.photalabs.com/blog/every-frontier-model-can-be-personalized-for-you/
1•ykhli•11m ago•0 comments

Show HN: HNswered – watches for replies to your Hacker News posts and comments

https://github.com/adam-s/HNswered
1•dataviz1000•13m ago•0 comments

Simple 3D Modeler on Web

https://sinter-3d.com/
2•db1024•17m ago•1 comments

Google Commits to Invest Up to $40B in Anthropic

https://www.nytimes.com/2026/04/24/technology/google-anthropic-investment-artificial-intelligence...
2•xnx•18m ago•0 comments

Cohere to Acquire Aleph Alpha

https://www.ft.com/content/4492c0d6-855b-4164-9ae5-f4d855a95f1e
2•mkirchner•23m ago•0 comments

What Is APL and What Can APL Do for You? (2024) [video]

https://www.youtube.com/watch?v=-5mSOyr8roc
2•tosh•25m ago•0 comments

Join the Choredle Android Beta Testers List

https://app.choreodle.com/#mlb2-40174361
1•mohanjith•26m ago•1 comments

The Geometry of Forgetting

https://arxiv.org/abs/2604.06222
2•ashwing1984•29m ago•0 comments

Use Built-In VPN in Firefox

https://support.mozilla.org/en-US/kb/built-in-vpn
1•HelloUsername•30m ago•0 comments

The Classic American Diner

https://blogs.loc.gov/picturethis/2026/04/the-classic-american-diner/
4•NaOH•32m ago•0 comments

Relays for Nimony's Standard Library

https://nim-lang.org/araq/relays.html
1•moigagoo•35m ago•0 comments

Show HN: I'm 15 and built a cryptographic accountability layer for AI agents

https://github.com/arian-gogani/nobulex
1•arian_•36m ago•0 comments

mine: A complete, no-frills IDE for Coalton and Common Lisp

https://twitter.com/stylewarning/status/2047736414704435535
2•tosh•40m ago•0 comments

Ubuntu 26.04 Released

https://discourse.ubuntu.com/t/ubuntu-26-04-resolute-raccoon-lts-released/80833
4•synergy20•40m ago•2 comments

AI Agent Designs a RISC-V CPU Core from Scratch

https://spectrum.ieee.org/ai-chip-design
2•Teever•42m ago•0 comments

APL\? (1990)

https://dl.acm.org/doi/epdf/10.1145/97811.97845
2•tosh•44m ago•0 comments

MiniZinc, constraint modelling language solve discrete optimisation problems

https://www.minizinc.org
2•Alifatisk•46m ago•0 comments

FluxBB Built with Rust

https://github.com/skorotkiewicz/fluxbb-rs
2•modinfo•48m ago•0 comments

'Startup Cowboys' Are Making This Texas Town the New Tech Hotspot

https://www.wsj.com/business/entrepreneurship/lockhart-texas-tech-hub-fd1bf380
3•malshe•49m ago•2 comments

A P2P Network for Collaborative AI Code Optimization

https://community.computer/
1•aiw1nt3rs•50m ago•0 comments

Before Apple Music, There Was MapleMusic–Canada's Forgotten Pioneer

https://thewalrus.ca/before-apple-music-there-was-maplemusic/
1•janandonly•50m ago•0 comments

QR Lume – a privacy‑first iOS tool for inspecting QR codes safely

https://apps.apple.com/us/app/qrlume/id6762032298
1•briwandt•51m ago•2 comments