frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

The Birthplace of AI

https://www.cantorsparadise.com/the-birthplace-of-ai-9ab7d4e5fb00
1•tzury•43s ago•0 comments

Show HN: Know Any Good Jokes?

https://6jokes.com
1•dobodob•5m ago•0 comments

Stable Release of OpenClaw

https://agentwatch.aicompass.dev
1•davideuler•6m ago•1 comments

Code with Claude 2026 – San Francisco (playlist) [video]

https://www.youtube.com/watch?v=GMIWm5y90xA&list=PLmWCw1CzcFim2obQ-w3ohbULOfwp5lApR
1•pramodbiligiri•13m ago•0 comments

EU calls VPNs "a loophole that needs closing" in age verification push

https://cyberinsider.com/eu-calls-vpns-a-loophole-that-needs-closing-in-age-verification-push/
2•muse900•15m ago•0 comments

Building an AI-Powered IDE Companion App

https://mesmacosta.medium.com/google-cloud/from-idea-to-execution-building-an-ai-powered-ide-comp...
1•graup•15m ago•2 comments

How empty are the depths of space?

https://bigthink.com/starts-with-a-bang/how-empty-depths-space/
1•Kaibeezy•16m ago•0 comments

Axavive Official Site – Activate Your Golden Seed Switch

https://finance.yahoo.com/sectors/healthcare/articles/axavive-skin-exploding-2026-golden-22590060...
1•zaxutayr•18m ago•0 comments

Color space conversion that transforms RGB/RYB colors in code/learn mode

https://rybitten.space/
1•jamiecurle•23m ago•0 comments

Perplexity Drops the Academic Integrity Mask

https://www.plagiarismtoday.com/2025/10/27/perplexity-drops-the-academic-integrity-mask/
1•jruohonen•24m ago•0 comments

Show HN: Hacker News Dark Mode Bookmarklet

https://github.com/gorgonian/hn-dark-bookmarklet
1•gorgonian•27m ago•0 comments

What Beijing learned about the U.S. from the Iran war

https://www.politico.com/news/2026/05/08/china-lessons-iran-trump-xi-00912539
1•KnuthIsGod•31m ago•0 comments

Data Visualisation Guide

https://data.europa.eu/apps/data-visualisation-guide/graphic-design-introduction
2•tosh•34m ago•0 comments

How Timeplus AgentGuard dectect realtime threats from Agent

https://timeplus-io.github.io/Presentation---AgentGuard-Introduction/
1•gangtao•36m ago•0 comments

How Axavive Supports Better Wellness Naturally?

1•JackSage•41m ago•0 comments

Whistling-only WhatsApp groups are taking off in Brazil

https://www.theguardian.com/world/2026/may/05/brazil-craze-whistling-only-whatsapp-groups
2•sahar_builds•43m ago•0 comments

Porting Starlark to Pure Python with Claude Code

https://dbohdan.com/starlark-python
1•networked•44m ago•0 comments

[Odds of hitting] a home run off the top of the foul pole

https://www.nytimes.com/athletic/7261633/2026/05/08/oneil-cruz-home-run-foul-pole-pirates/
1•Kaibeezy•51m ago•1 comments

A Technical Dive into Formalization of Chess Tactics

https://lichess.org/@/heroku/blog/gofchess--a-technical-dive-into-formalization-of-chess-tactics/...
2•heroku•1h ago•0 comments

Show HN: My New Projects Website

https://apps.weichart.de
1•surrTurr•1h ago•0 comments

The Making of Steven Spielberg's Jurassic Park (2012)

https://www.blu-ray.com/news/?id=8186
2•susam•1h ago•0 comments

Deepsec: The security harness for finding vulnerabilities

https://vercel.com/blog/introducing-deepsec-find-and-fix-vulnerabilities-in-your-code-base
1•gmays•1h ago•0 comments

Watts Wasting Texas Water [pdf]

https://www.sierraclub.org/sites/default/files/2026-05/texaswaterreport_final.pdf
2•littlexsparkee•1h ago•0 comments

Aurora: A Leverage-Aware Optimizer for Rectangular Matrices

https://blog.tilderesearch.com/blog/aurora
1•sanxiyn•1h ago•0 comments

Snapseed 4.0 – Note from the Team

https://old.reddit.com/r/snapseed/comments/1t7j7yt/snapseed_40_a_note_from_the_snapseed_team/
1•satvikpendem•1h ago•0 comments

Fertilizer time bomb threatens to drive up Europe's food prices

https://www.politico.eu/article/europe-farmer-fertilizer-prices-iran-war-inflation/
1•leonidasrup•1h ago•0 comments

Italy looks to Libyan gas fields to replace supply shortages from Iran war

https://www.politico.eu/article/italy-libya-gas-replace-supply-shortage-iran-war/
1•leonidasrup•1h ago•0 comments

How to Build Vector Search from Scratch in Python

https://www.kdnuggets.com/how-to-build-vector-search-from-scratch-in-python
1•eigenBasis•1h ago•0 comments

Cloud Embeddings vs. Local Sovereign Memory

https://medium.com/@vektormemory/cloud-embeddings-vs-local-sovereign-memory-ai-agent-memory-layer...
1•vektormemory•1h ago•0 comments

Using Claude Code: The unreasonable effectiveness of HTML

https://twitter.com/trq212/status/2052809885763747935
36•pretext•1h ago•13 comments