frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Five-year review of BQN design

https://mlochbaum.github.io/BQN/commentary/fiveyears.html
1•tosh•48s ago•0 comments

You Can't Game Your Way to a Real Education

https://www.nytimes.com/2026/04/19/opinion/schools-edtech-laptops-games-learning.html
1•7402•1m ago•0 comments

Hyrum's Law: The hunt for a faster syscall trap (2004)

https://devblogs.microsoft.com/oldnewthing/20041215-00/?p=37003
1•signa11•2m ago•0 comments

Clearwing: Produce similar results as Anthropic Glasswing (Mythos)

https://github.com/Lazarus-AI/clearwing
1•ninjagoo•2m ago•1 comments

Knime will undergo enshittification in 2026

https://forum.knime.com/t/batch-execution-no-longer-supported/91773?page=3
1•nijuashi•4m ago•1 comments

In Telluride, regulations designed to help renters drive many out of town

https://coloradosun.com/2026/04/19/telluride-rent-regulations-renters-affordability-shandoka-sunn...
1•mooreds•6m ago•0 comments

How to Make a Lichtenberg Machine from Your Microwave: A Step-by-Step Guide

https://kitchenpearls.com/how-to-make-a-lichtenberg-machine-from-microwave/
1•thunderbong•7m ago•0 comments

Passkeys, Explained for a Developer

https://gist.github.com/david-crespo/0a4e5fcf8cd95d02e2673bcfff25cae4
1•mooreds•7m ago•0 comments

The Future of Petrochemicals Towards a more sustainable chemical industry (2018)

https://www.iea.org/reports/the-future-of-petrochemicals
1•wallflower•7m ago•0 comments

Matt Mullenweg Overrules Core Committers; Puts Akismet on WP 7's Connector List

https://www.therepository.email/matt-mullenweg-overrules-core-committers-to-put-akismet-on-wordpr...
2•mooreds•8m ago•0 comments

Why AI Needs a Sense of Smell

https://www.noemamag.com/why-ai-needs-a-sense-of-smell/
1•andrewl•10m ago•0 comments

Hello old new "Projects" directory

https://blog.tenstral.net/2026/04/hello-projects-directory.html
1•birdculture•12m ago•0 comments

Contracted ARR Considered Harmful

https://arnon.dk/contracted-arr-considered-harmful/
2•arnon•12m ago•0 comments

One in a hundred people in Russia is HIV-positive, expert says

https://tass.com/society/2051659
1•rawgabbit•12m ago•0 comments

Ask HN: Why doesn't Anthropic just anonymously make money on bug bounties?

2•mr_coffee•13m ago•2 comments

VPN provider OVPN has stopped publishing transparency reports

https://www.ovpn.com/en/transparency
2•thomashabets2•17m ago•1 comments

Vercel April 2026 security incident

https://vercel.com/kb/bulletin/vercel-april-2026-security-incident
11•colesantiago•18m ago•0 comments

Show HN: HumansMap Interactive Graph of 1M+ Wikidata Entities with Investigate

https://humansmap.com/
1•abstracthinking•19m ago•1 comments

Engels' Pause and the Permanent Underclass

https://www.fabricatedknowledge.com/p/mythos-and-engels-pause
2•momentmaker•19m ago•0 comments

Z80 CP/M emulator for Windows

https://github.com/avwohl/z80cpmw
1•AlexeyBrin•20m ago•0 comments

Potoooooooo

https://en.wikipedia.org/wiki/Potoooooooo
1•surprisetalk•22m ago•0 comments

Second Sexual Assault Trial Opens Against Uber in North Carolina Federal Court

https://www.law.com/2026/04/17/second-sexual-assault-trial-opens-against-uber-in-north-carolina-f...
2•1vuio0pswjnm7•22m ago•0 comments

Vercel may have been breached

https://twitter.com/theo/status/2045862972342313374
7•MattIPv4•24m ago•2 comments

Trump orders more access to psychedelics like LSD, psilocybin and ibogaine

https://www.washingtonpost.com/politics/2026/04/17/trump-psychedelics-psylocibin-research/
2•surprisetalk•26m ago•1 comments

Blocked from submiting a 0-day ransomware sample

2•hello-friend•26m ago•0 comments

The creative software industry has declared war on Adobe

https://www.theverge.com/tech/913765/adobe-rivals-free-creative-software-app-updates
4•tambourine_man•27m ago•0 comments

The Vertical AI OS: What I'd Build If I Were Starting a SaaS Today

https://substack.com/home/post/p-194446321
1•interrupt86•27m ago•0 comments

What Does a Typical Person Look Like?

https://nchagnet.eu/blog/what-does-average-person-look-like/
1•Brajeshwar•29m ago•0 comments

DictaFlow – hold-to-talk AI dictation that works inside Citrix and RDP

https://dictaflow.io/
1•ryanshrott•30m ago•0 comments

The Irreducibility of Production Experience in Software

https://www.aravindjayendran.com/writing/irreducibility-of-production-experience
2•maxaravind•30m ago•0 comments