frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•8mo 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•8mo 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•8mo 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 Joy of Not Learning: How AI Saves My Hobby Projects

https://harichetlur.com/blog/the-joy-of-not-learning-how-ai-saves-my-hobby-projects/
2•harichetlur•5m ago•0 comments

China reports largest gold discovery in more than seven decades

https://www.euronews.com/business/2025/11/14/china-reports-largest-gold-discovery-in-more-than-se...
1•wslh•9m ago•1 comments

Show HN: Cyber+ – A cybersecurity-focused programming language

https://github.com/TanmayCzax/Cyber-Programming-language-Alpha
1•CzaxTanmay•10m ago•0 comments

Photographer 'over the Moon' with iconic ET recreation two years in the making

https://www.bbc.com/news/articles/cp3z475kxwpo
1•1659447091•11m ago•0 comments

New Apple Creator Studio Icons

https://www.reddit.com/r/MacOS/s/aPa5goAtSo
1•virgildotcodes•12m ago•0 comments

Ask HN: How to find gaps and oppurtunities in the AI era?

3•SRMohitkr•17m ago•0 comments

End-to-End Encrypted RCS Messages Referenced in Latest iOS 26.3 Beta

https://twitter.com/TiinoX83/status/2010830920681427199
2•7777777phil•17m ago•0 comments

DHS Deportation Reels Are Getting Copyright Strikes for Unlicensed Music Use

https://reason.com/2026/01/11/the-deportation-playlist-is-mostly-stolen/
7•fortran77•20m ago•0 comments

First impressions of Claude Cowork, Anthropic's general agent

https://simonw.substack.com/p/first-impressions-of-claude-cowork
3•stosssik•22m ago•0 comments

Keir Starmer abandons plans for compulsory digital ID

https://www.thetimes.com/uk/politics/article/digital-id-scrapped-u-turn-keir-starmer-7zcwqqvb5
4•petethomas•22m ago•0 comments

A Journey of Validating a Healthcare Startup

https://jeevan.life/healthcare.html
1•ssunboyy•25m ago•0 comments

HiGP: A high-performance Python package for Gaussian Process

https://arxiv.org/abs/2503.02259
1•7777777phil•25m ago•0 comments

Incomputable Language: An Essay on AI

https://www.eruditorumpress.com/blog/on-incomputable-language-an-essay-on-ai
1•drnrb•25m ago•0 comments

AI Reliance Logging

https://zenodo.org/records/18239999
1•businessmate•27m ago•1 comments

A book about Solo Building

https://solobuilding.com/
1•mddanishyusuf•34m ago•0 comments

Good Use of Postgres

https://vivekn.dev/blog/good-use-of-postgres/
1•viveknathani_•35m ago•0 comments

When You are Waiting for a Miracle [video]

https://www.youtube.com/watch?v=1-b52n7mYnc
1•marysminefnuf•38m ago•0 comments

Show HN: A directory to discover and install validated Agent Skills

https://www.agentskills.guide/
2•superhuang•47m ago•1 comments

Meta cuts more than 1k in Bay Area tech's first big layoff of 2026

https://www.sfgate.com/tech/article/meta-layoff-1000-first-2026-21293134.php
6•apparent•49m ago•0 comments

One-page static blog using headless CMS

https://github.com/sleekcms/sleekcms-spa-blog
1•yusufnb•51m ago•0 comments

Saccade

https://en.wikipedia.org/wiki/Saccade
1•petethomas•54m ago•0 comments

Show HN: RAG Architecture for optimizing retrieval volume/relevancy tradeoff

https://github.com/darwinapps/nestedRAG
1•Gregoryy•56m ago•0 comments

Show HN: Git-identity-switcher – a CLI to switch Git user identity per repo

https://github.com/csawai/git-identity-switcher
1•csawai•57m ago•0 comments

Zhipu and Huawei open-source GLM-Image on Chinese chips

https://glm-image-ai.app
1•nanobanana•58m ago•0 comments

Saks Global files for bankruptcy after Neiman Marcus takeover leads to collapse

https://www.reuters.com/business/retail-consumer/saks-global-files-bankruptcy-after-neiman-marcus...
1•testrun•58m ago•0 comments

Bringing the Predators to Life in MAME

https://lysiwyg.mataroa.blog/blog/bringing-the-predators-to-life-in-mame/
1•msephton•58m ago•0 comments

Get professional marketing growth services through Amplift

https://amplift.ai/
4•gaygum102•59m ago•1 comments

The <Geolocation> HTML Element

https://developer.chrome.com/blog/geolocation-html-element
1•enz•1h ago•0 comments

Show HN: MapMates – A map for expats to find people in new cities

https://mapmates.io/
1•digi_wares•1h ago•0 comments

From kinetic gases to an exponentially expanding universe

https://iopscience.iop.org/article/10.1088/1475-7516/2025/10/050
1•diwank•1h ago•0 comments