frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•1y 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•1y 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•1y 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).

Show HN: Kitten PM – A product management SIM game inspired by Lemmings

https://kittenpm.com/
1•sooperT•3m ago•0 comments

Qwen Image 3.0 Pro vs. GPT Image 2 for production image APIs

https://flaq.ai/models/alibaba/qwen-image-3-0-pro/
1•FlaqAI•4m ago•0 comments

Show HN: My Lost Bop – A digital children's music book

https://bopbook.com
1•zmilou•6m ago•1 comments

DeepSeek-v4-flash-vision-exp

https://api-docs.deepseek.com/guides/vision/
1•dares2573•7m ago•0 comments

Mini Spark: building a tiny distributed compute engine to count pizza orders

https://growingbits.dev/distributed-computing/building-mini-spark
1•MexicanYoda•7m ago•0 comments

Digital Sovereignty in Practice: Strategies for Technological Independence

https://sjaaklaan.nl/?e=183
1•oceans76•9m ago•0 comments

My experience buying ads in ChatGPT: the good, the bad and the ugly

https://successfulsoftware.net/2026/08/13/my-experience-buying-ads-in-chatgpt-the-good-the-bad-an...
1•hermitcrab•10m ago•0 comments

Dartwords – The Word Game That Responds to You

https://www.dartwords.com/
1•taytus•10m ago•0 comments

Which is the best HARNESS? Ship benchmark with codex, jcode, pi, OpenCode, dsh [video]

https://www.youtube.com/watch?v=tvr_Ii88e_w
1•grigio•10m ago•0 comments

Localized video ad creative without reshooting per market

https://siriusly.ai/
1•aiwalter•11m ago•0 comments

Go 1.27 Released with Generic Methods, JSON v2, and Faster Memory Allocation

https://linuxiac.com/go-1-27-released-with-generic-methods-json-v2-and-faster-memory-allocation/
1•theHocineSaad•12m ago•0 comments

Watch a 535B parameter (23B active) LLM get trained live

https://wandb.ai/marin-community/marin_moe/reports/535B-A23B-18T-Token-Hero-Run-Scaling-Ladder--V...
1•vignesh_warar•15m ago•0 comments

Survival mode': Indiana residents endure a ninth day without power

https://apnews.com/article/indiana-power-outages-gary-ohio-floods-e0fbdd4a721b6269e8ec62e512299b11
2•geox•15m ago•0 comments

Miniaturized High-Frequency Matrix Transformers for EV Onboard Chargers [video]

https://www.youtube.com/watch?v=y5rKlyQ3TDo
1•Klaster_1•16m ago•0 comments

Bexra – an AI-powered growth system for founders who don't know what to do next

1•bexra•16m ago•0 comments

ArchSpec: Executable Architecture Specification for Ruby's Agentic Coding Era

https://paolino.me/archspec/
1•earcar•17m ago•0 comments

Source Code Is Becoming a Build Artifact

https://accemic.com/articles/source-code-is-becoming-a-build-artifact/
1•xlbxrt•18m ago•0 comments

Crt.name: Subdomain Enumeration via Certificate Transparency

https://crt.name/
1•Lwrless•18m ago•0 comments

GenBio launches a virtual biological cell

https://lifespan.io/genbio-launches-a-virtual-cell-ai-model/
1•ltononro•19m ago•1 comments

If this is it, it's been good

https://chrispattle.com/blog/if-this-is-it-its-been-good
2•pattle•22m ago•1 comments

The Unreasonable Effectiveness of Multiple Dispatch [video]

https://www.youtube.com/watch?v=kc9HwsxE1OY
1•so-cal-schemer•23m ago•0 comments

A Trillion Times Larger

https://0xsmac.substack.com/p/a-trillion-times-larger
1•tosh•23m ago•0 comments

Nouswise Review: AI Research Agent and Thinking Partner

https://delavo.de/en/writing/nouswise-ai-research-agent/
3•realsarm•26m ago•1 comments

I Tried build AI web vulnerable scanner

https://github.com/tX-c0re/xss-grenade
1•txc0re•26m ago•1 comments

OpenZFS: Implement FIDEDUPERANGE via block cloning

https://github.com/openzfs/zfs/commit/afb4010325a52413c0ad813885eed50738a8380b
1•bilegeek•26m ago•0 comments

Gia: A natural-language search compiler

https://usegia.com/intro
2•mantegna•27m ago•1 comments

TSMC Completes 1.6-Nm Chip, Eyes Q4 Mass Production

https://en.sedaily.com/international/2026/08/21/taiwans-tsmc-completes-16-nm-chip-eyes-q4-mass-pr...
1•giuliomagnifico•28m ago•0 comments

As More Americans Turn to Cannabis, Problem Use Is Increasing

https://www.nytimes.com/2026/08/19/well/cannabis-use-disorder-alcohol.html
2•johntfella•30m ago•1 comments

MNT Station A modular, open hardware desktop computer and server

https://www.crowdsupply.com/mnt-research/mnt-station
2•vaylian•31m ago•1 comments

Wing Commander 2 source reconstruction and SDL2 port

https://github.com/neuromancer/wc2-re
1•galapago•33m ago•0 comments