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

Claude Artifacts

https://claude.com/blog/artifacts-in-claude-code
2•czeizel•2m ago•0 comments

Show HN: One-click fork of "Everything Claude Code" onto an isolated microVM

https://www.jurniti.com/templates/ecc
1•shving90•3m ago•0 comments

Trillions of dollars spent just to work on customer services?

1•YihaoZhang•4m ago•0 comments

Capitol Alpha Machine – interactive viz of congressional stock trades

https://capitolalpha.app/
1•sylvainbe•8m ago•0 comments

GCP IAM Authorization Bypass

https://olearysec.com/research/config-connector-authorization-bypass/
3•sanbor•8m ago•0 comments

Show HN: Avera – a deterministic check that proves no regression was introduced

https://github.com/tc7kxsszs5-cloud/avera
1•kiku79•9m ago•0 comments

Build yor form back end infrastrture under 30sec

1•unaisshemim•10m ago•0 comments

Elysia Marginata

https://en.wikipedia.org/wiki/Elysia_marginata
1•ZeljkoS•12m ago•1 comments

RemotePower – self-hosted fleet monitoring with built-in vulnerability scanning

https://github.com/tyxak/remotepower
1•tyxak•17m ago•0 comments

Show HN: I was drowning in browser tabs, so I built this

https://microsoftedge.microsoft.com/addons/detail/gopeek/ffaeanmhghmohbponokefmbhfkkomnmk
3•formit34•17m ago•1 comments

Icon.museum – A curated gallery of app icon design

https://icon.museum
1•akashwadhwani35•18m ago•0 comments

Impossible Challenge

https://itch.io/jam/impossible-challenge
1•alisio85•18m ago•0 comments

Terminal-Bench Challenges: long-horizon, token-intensive, single-task benchmarks

https://www.tbench.ai/news/terminal-bench-challenges
1•matt_d•18m ago•0 comments

High-performance code intelligence MCP server

https://github.com/DeusData/codebase-memory-mcp
1•giamma•19m ago•1 comments

Show HN: Redteam:If you are using more than 2 coding agents

https://github.com/AscendyProject/redteam
1•rkdgh19•23m ago•0 comments

Usbliter8 an A12/A13 SecureROM Exploit

https://ps.tc/pages/blog-usbliter8.html
2•Cider9986•25m ago•0 comments

Ukrainian drone makers target Asia as Taiwan tensions spur demand

https://www.reuters.com/world/china/ukrainian-drone-makers-target-asia-taiwan-tensions-spur-deman...
1•JumpCrisscross•26m ago•0 comments

HN with pics – a visual hcker.news reader

https://hn.is-ai-good-yet.com/
1•ilyaizen•30m ago•0 comments

Dana Scott: Lambda Calculus, Forcing and the Foundations of Math: #14 aboutlogic [video]

https://www.youtube.com/watch?v=opLbbZ-_AWE
1•matt_d•32m ago•0 comments

Prodigy: AI Employees

https://docs.google.com/presentation/d/1aldEHGR_1Hv_F0UlTuQIL8mXhsw5s5VzuuPcgKV5czY/edit?usp=sharing
2•samayashar•36m ago•2 comments

We built a status page service on Cloudflare

https://ampliflare.com/blog/status-page-cloudflare-architecture/
1•powerpurple•39m ago•1 comments

I tested Gemma4 12B on my 8GB GPU, now I don't want to go back to smaller models

https://www.xda-developers.com/tested-google-gemma-4-12b-on-8gb-gpu-and-dont-want-to-go-back-to-s...
1•theanonymousone•40m ago•0 comments

Make-work and Sub-subsistence work

https://wilsoniumite.com/2026/06/19/make-work-and-sub-subsistence-work/
1•Wilsoniumite•40m ago•0 comments

'We created a monster': companies rein in AI usage as costs strain budgets

https://www.ft.com/content/1d37cc08-e0aa-45a4-a45d-4ad282529314
2•JumpCrisscross•41m ago•0 comments

One Model Won't Save You: How We Built Our AI Stack

https://www.xelerate.tech/one-model-wont-save-you/
1•pedrocha•42m ago•0 comments

Mantyx – Batteries Included Managed Agent Runtime

https://mantyx.io/
1•mantyx•42m ago•0 comments

Show HN: Write SaaS apps where users control where their data is stored

https://github.com/wolfoo2931/linkedrecords/
1•WolfOliver•48m ago•0 comments

Disney+ Is Down

https://mashable.com/tech/disney-plus-down-outage
2•01-_-•49m ago•0 comments

I Replaced My Custom Next.js Portfolio with a Markdown First Site Engine

https://muhammadhaseeb.me/blog/why-koji
1•iamhaseeb•50m ago•0 comments

Contributor Poker and Zig's AI Ban

https://kristoff.it/blog/contributor-poker-and-ai/
2•birdculture•54m ago•0 comments