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

Swiftpoint Z3: Do you need this much mouse?

https://www.swiftpoint.com/products/swiftpoint-z3-ea
1•Exorust•45s ago•0 comments

Been building a multi-agent framework in public for 5 weeks, its been a Journey

https://github.com/AIOSAI/AIPass
1•Input-X•1m ago•1 comments

Generation DI – Not Worse but Other

https://singularityforge.space/2026/04/12/generation-di-not-worse-but-other/
1•Voice_of_Void•4m ago•0 comments

Being a Junior Scientist in the Current Administration

https://mirawelner.com/posts/junior.html
1•mirawelner•5m ago•0 comments

Show HN: SnatchHub – An App That Solves The "who's using staging?" Problem

https://getsnatchhub.com
2•boothemoo•8m ago•0 comments

Specs for Quantum Processor Design

https://drive.google.com/file/d/1tsVV7tPQks3x70wMoJJYhuywSboaxKs0/view?usp=drivesdk
1•GeometryKernel•14m ago•0 comments

I want a better [build] action graph serialization

https://jyn.dev/i-want-a-better-action-graph-serialization/
1•jackschu•16m ago•0 comments

UltraDAG – Sub-4MB blockchain full node in Rust

https://github.com/UltraDAGcom/core
1•johanmichel•18m ago•0 comments

Designing Reproducible Test Environments for RPPG

https://www.mdpi.com/3042-7886/2/2/3
1•PaulHoule•20m ago•0 comments

A shared state system for plugins (Rust)

https://ahoyiski.neocities.org/posts/shared-state/
2•itzlambda•21m ago•0 comments

Fun with an indecisive AI coding agent

https://benhoyt.com/writings/indecisive-ai-agent/
1•ingve•22m ago•0 comments

Canada revokes crypto firms' registrations

https://www.icij.org/investigations/coin-laundry/canada-revokes-dozens-of-crypto-firms-registrati...
3•gnabgib•22m ago•1 comments

I ran Gemma 4 as a local model in Codex CLI

https://blog.danielvaughan.com/i-ran-gemma-4-as-a-local-model-in-codex-cli-7fda754dc0d4
4•dvaughan•23m ago•0 comments

I audited Garry's website after he bragged about 37K LOC/day

https://twitter.com/Gregorein/status/2038953944475472316
2•medalblue•23m ago•0 comments

Tips to Give Effective Employee Feedback

https://effortbox.com/blog/tips-to-give-effective-and-constrictive-employee-feedback/
2•andreylangovoy•24m ago•0 comments

Running Gemma 4 Locally with the Codex CLI: What Works

https://codex.danielvaughan.com/2026/04/10/gemma-4-local-model-codex-cli-setup-guide/
1•dvaughan•24m ago•0 comments

Show HN: walnut – Error tracking AI agents

https://github.com/bilalg1/walnut
1•bgwmj•28m ago•0 comments

I built autonomous AI with memory and sleep, and it had nightmares

https://negrenavarro.me/blog/lana
2•isitdan•30m ago•0 comments

FIY – A general purpose federation protocol

https://fiy.to/
2•mrunix•33m ago•0 comments

Gaming Film and Sponsors

https://rockyhaag.substack.com/p/remember-the-breakfast-club
1•maxalias•34m ago•0 comments

Uncharted island soon to appear on nautical charts

https://www.awi.de/en/about-us/service/press/single-view/unkartierte-insel-demnaechst-auf-seekart...
3•tannhaeuser•36m ago•1 comments

Israeli strike kills infant girl in south Lebanon during father's funeral

https://www.reuters.com/world/middle-east/israeli-strike-kills-infant-girl-south-lebanon-during-f...
47•lr0•36m ago•8 comments

Physicists zero in on the mass of the fundamental W boson particle

https://news.mit.edu/2026/physicists-report-mass-fundamental-w-boson-particle-0408
3•01-_-•38m ago•0 comments

Show HN: Redactify – macOS/iOS app to redact sensitive data before using LLMs

3•ladino•38m ago•0 comments

The Maintainers

https://themaintainers.org/
1•gpvos•39m ago•0 comments

Navy to use underwater drones to help clear Iranian mines from Strait of Hormuz

https://defensescoop.com/2026/04/11/strait-of-hormuz-mine-clearance-navy-centcom-underwater-drones/
3•delichon•43m ago•0 comments

Solar panels are creating an unexpected effect by forming rainfall clouds

https://www.ecoportal.net/en/solar-panels-are-creating-rain-clouds/19854/
4•rbanffy•44m ago•1 comments

Nouns Agentic – Enabling AI Agents to Buy Nouns and Participate

https://noun.wtf/grants/8
1•developerfred•47m ago•0 comments

Yuri's Night: commemoration of Gagarin as the first human in space 12 April

https://yurisnight.net/
1•thinkingemote•47m ago•0 comments

Springdrift: An Auditable Persistent Runtime for LLM Agents

https://arxiv.org/abs/2604.04660
1•s_brady•48m ago•0 comments