frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

GitHub Actions and the HashFiles Incident

https://lists.reproducible-builds.org/pipermail/rb-general/2025-November/003941.html
1•sanqui•58s ago•0 comments

Exodus – The Colonization of Space

https://store.steampowered.com/app/4098020/Exodus_The_Colonization_of_Space/
1•Infiltrator•2m ago•0 comments

Ruby Was Ready from the Start

https://obie.medium.com/ruby-was-ready-from-the-start-4b089b17babb
1•thunderbong•4m ago•0 comments

MegaETH Just Feels Different

https://blog.arcbjorn.com/megaeth-just-feels-different
1•arcbjorn•5m ago•0 comments

Show HN: I built a CLI tool to map your codebase for LLMs

https://github.com/JordanCoin/codemap
2•jordancj•12m ago•0 comments

Trifold is a tool to quickly and cheaply host static websites using a CDN

https://www.jpt.sh/projects/trifold/
1•birdculture•14m ago•0 comments

AI-crafted interactive experiences, generated instantly from any prompt

https://generativeui.net//
1•BruceWok•20m ago•2 comments

LLM assisted book reader by Karpathy

https://github.com/karpathy/reader3
2•pbd•20m ago•0 comments

I launched a directory with well-made products because everything seems buggy

https://select.supply
3•laurentiurad•23m ago•1 comments

Show HN: Norma – build good datasets (using an objective)

https://norma.grouplabs.ca
1•noelfranthomas•23m ago•0 comments

Quake Engine Indicators

https://fabiensanglard.net/quake_indicators/index.html
1•liquid_x•24m ago•0 comments

Show HN: Implementing a core subset of ARM assembly in pure C89

https://github.com/orionfollett/oarm
1•orionfollett•27m ago•0 comments

I am building a collaborative coding agent

1•brainless•28m ago•0 comments

LGTM Culture: A Short Story

https://alt.management/lgtm-culture/
2•HotGarbage•36m ago•0 comments

Cloudflare: Piracy Liability Ruling Has Global Implications; Publishers Disagree

https://torrentfreak.com/cloudflare-says-piracy-liability-ruling-sets-a-dangerous-precedent-the-p...
1•gslin•40m ago•0 comments

The Anatomy of a Dysfunctional Standards Body – Peter Gutmann [pdf]

https://archive.openssl-conference.org/2025/presentations/Peter_Gutmann_ietf.pdf
2•commandersaki•44m ago•0 comments

Solar Superstorm Gannon crushed Earth's plasmasphere to a record low

https://www.sciencedaily.com/releases/2025/11/251122234723.htm
2•ashishgupta2209•50m ago•0 comments

A tiny fantasy console inspired by early 90s handheld consoles

https://github.com/beep8/beep8-sdk
2•beep8_official•50m ago•1 comments

What is the most cramped memory card you own?

https://www.tomshardware.com/pc-components/microsd-cards/the-small-capacity-memory-card-champions...
2•indigoabstract•51m ago•0 comments

The "Good Enough" Lie in Engineering

https://www.andrewvittiglio.com/thoughts/the-good-enough-lie
1•andr3wV•1h ago•1 comments

Earth just got hit by a stealth solar storm no one saw coming

https://www.space.com/stargazing/auroras/earth-just-got-hit-by-a-stealth-solar-storm-no-one-saw-c...
2•Brajeshwar•1h ago•0 comments

Is the AI Bubble About to Burst?

https://singularityhub.com/2025/11/21/is-the-ai-bubble-about-to-burst-what-to-watch-for-as-the-ma...
1•Brajeshwar•1h ago•0 comments

A million ways to die from a data race in Go

https://gaultier.github.io/blog/a_million_ways_to_data_race_in_go.html
2•broken_broken_•1h ago•0 comments

The Latent Role of Open Models in the AI Economy

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5767103
1•signa11•1h ago•0 comments

No free lunch in vibe coding

https://bytesauna.com/post/prompting
2•mapehe•1h ago•1 comments

IDescriptor: A Cross-Platform iOS Device Management Tool

https://github.com/iDescriptor/iDescriptor
2•0x54MUR41•1h ago•0 comments

Show HN: Qdrant Vector Aggregator

https://github.com/vinerya/qdrant_vector_aggregator
3•chelbi•1h ago•1 comments

Hackers Bypass Signal, Telegram and WhatsApp Encryption to Read Messages

https://www.forbes.com/sites/daveywinder/2025/11/23/hackers-bypass-signal-telegram-and-whatsapp-e...
3•mionhe•1h ago•0 comments

Build a Compiler in Five Projects

https://kmicinski.com/functional-programming/2025/11/23/build-a-language/
4•azhenley•1h ago•0 comments

Show HN: Syd – An offline-first, AI-augmented workstation for blue teams

https://www.sydsec.co.uk
7•paul2495•1h ago•2 comments