frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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

1•waseyjamal•28s ago

AI Is Turning Engineers into Farmers, Doctors and Gardeners

https://aswinmohan.me/ai-doctors-engineers
1•aswinmohanme•1m ago•0 comments

Huawei Touts Chip Breakthrough to Shorten Gap with TSMC

https://www.bloomberg.com/news/articles/2026-05-25/huawei-touts-chipmaking-breakthrough-to-shorte...
1•rbanffy•8m ago•0 comments

Apple: Human Interface Guidelines

https://github.com/gingerbeardman/apple-human-interface-guidelines/tree/main
1•tosh•8m ago•0 comments

Mark Zuckerberg's Right-Hand Man Who's Unleashing AI at Meta

https://www.wsj.com/tech/ai/meta-andrew-bosworth-ai-3df12d4f
1•Brajeshwar•10m ago•0 comments

Show HN: Cursed Browser – a VLM reads the HTML and hallucinates the page

https://github.com/scosman/cursed_browser
1•scosman•12m ago•0 comments

Vibe Coding Your Infrastructure

https://www.ivan.codes/blog/vibe-coding-infrastructure
2•ivandotcodes•12m ago•0 comments

Show HN: Linear Chess – Normal Chess, on a 1D board

https://youbee.cloud/chess/chess.html
1•MarcellusDrum•16m ago•0 comments

You Were Never Declaring State. You Were Observing by Hand

https://webframp.com/posts/you-were-never-declaring-state/
1•nickstinemates•17m ago•0 comments

I just sequenced a human genome to 30× coverage at home

https://twitter.com/SethSHowes/status/2058835208586362913
1•MrBuddyCasino•19m ago•0 comments

Exit IP VPN servers mitigation rollout

https://mullvad.net/en/help/exit-ip-vpn-servers-mitigation-rollout
2•Cider9986•20m ago•0 comments

Bursting My AI Bubble

https://indecisiorama.bearblog.dev/bursting-my-ai-bubble/
2•wrxd•20m ago•0 comments

Exit IP fingerprinting between VPN servers

https://mullvad.net/en/blog/exit-ip-fingerprinting-between-vpn-servers
1•Cider9986•20m ago•0 comments

Alexander Horned Sphere

https://en.wikipedia.org/wiki/Alexander_horned_sphere
1•thunderbong•22m ago•0 comments

AI Evaluation Is Biased – By Design

https://alokit.substack.com/p/your-ai-evaluation-is-biased-by-design
1•avikalp•25m ago•0 comments

Show HN: Browser-based Glider Sim

https://glider.benedictshegog.xyz/
1•bensg•26m ago•0 comments

S there room for a VPN with zero Five Eyes servers and RAM-only infrastructure?

1•yanbinette•26m ago•2 comments

Michael Phelps on finding purpose beyond the pool

https://www.cnn.com/2026/05/25/sport/michael-phelps-mental-health-water-safety
1•mooreds•26m ago•0 comments

Big university system is embracing AI. Students/faculty aren't all on board

https://text.npr.org/nx-s1-5772820
2•mooreds•27m ago•0 comments

Show HN: A web to see nearby TFL trains

https://nexttrain.london
1•mgranados•27m ago•0 comments

What ClickHouse learned from a year of coding with AI agents

https://thenewstack.io/clickhouse-ai-coding-agents/
1•Brajeshwar•28m ago•0 comments

The Coming Layoffs and the Revenge of the Measurers

https://www.hackyexperiments.com/blog/the-revenge-of-the-measurers
3•bilater•29m ago•0 comments

Google facing court for retaliation against Gaza whistleblower

https://www.foxglove.org.uk/2026/05/20/google-court-retaliation-gaza-whistleblower/
1•lovegrenoble•31m ago•0 comments

Hacker News RSS

https://hnrss.github.io/
1•mooreds•31m ago•0 comments

StubZero: $148,337 RCE in Google Cloud Production

https://brutecat.com/articles/google-cloud-rce/
1•Cider9986•33m ago•0 comments

Ask HN: Is it just me or has Gemini enshittified in the last three weeks?

1•EvanMcCormick•33m ago•1 comments

Huawei announced it will have a 1.4nm equivalent density process by 2031

https://www.electronicsweekly.com/news/business/huawei-looks-to-1-4nm-by-2031-2026-05/
1•yogthos•33m ago•0 comments

Pouta.dev – Open-Source Block Editor CMS for Astro, Next.js on Cloudflare

https://pouta.dev/
2•mohanjith•35m ago•0 comments

Are "Real" Catholics as Conservative as Evangelicals?

https://www.graphsaboutreligion.com/p/are-real-catholics-as-conservative
1•lordleft•36m ago•0 comments

AI Datacenters Were Built for GPUs. What Happens When You Remove the GPUs?

https://almartis.xyz/gpu-free-datacenter.html
1•AlassaneSakande•37m ago•1 comments