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

Delivery Hero confirms takeover offer from Uber

https://www.reuters.com/business/delivery-hero-confirms-takeover-offer-uber-2026-05-23/
1•thm•1m ago•0 comments

Seeking a Language in Mathematics 1523-1571

https://tyndale.org/journals/reformj01/bmarsden.html
1•jruohonen•3m ago•0 comments

Show HN: Logo Fonts

https://logofonts.surge.sh/
1•stagas•10m ago•0 comments

Why Every IKEA Product Has a Weird Name [video]

https://www.youtube.com/watch?v=c89T2snPvNo
2•vinhnx•16m ago•0 comments

Testing

1•eyyeyeyeyeyey•20m ago•0 comments

Meta's Claudeonomics leaderboard

https://www.indiatoday.in/technology/news/story/meta-shuts-down-internal-claudeonomics-ai-tool-af...
1•phront•21m ago•0 comments

I tracked down the thief who stole $200k of Lego [video]

https://www.youtube.com/watch?v=wscQpkcwgNU
1•pinkmuffinere•24m ago•1 comments

Limerick

https://www.worldwidewords.org/surprise.html
1•jruohonen•30m ago•0 comments

We Were Wrong About Fasting Study Finds

https://www.sciencealert.com/we-were-wrong-about-fasting-massive-study-finds
2•mikhael•36m ago•0 comments

C Constructs That Still Don't Work in C++ – and a Few That Changed

https://lospino.so/blog/c-constructs-that-still-dont-work-in-cpp/
1•jandeboevrie•38m ago•0 comments

A Data Mining Adventure into the World of Lichess Puzzle Database

https://lichess.org/@/heroku/blog/how-many-different-backrank-mates-are-there/gSUlcRkl
2•heroku•40m ago•0 comments

The Verification Problem (On OpenAI's Erdős Disproof)

https://korbonits.com/blog/2026-05-23-the-verification-problem/
1•korbonits•41m ago•0 comments

AI Can Do Anything

https://clawdcursor.com
2•AmDab•42m ago•0 comments

Does bulk memmove speed up std:remove_if? (No.)

https://quuxplusone.github.io/blog/2026/05/23/chunked-remove/
1•jandeboevrie•42m ago•0 comments

European Data Centers Reuse Waste Heat to Heat Homes

https://letsdatascience.com/news/european-data-centers-reuse-waste-heat-to-heat-homes-48086eeb
1•GeorgeWoff25•43m ago•0 comments

How to Call an API from an Email

https://redo.com/eng-blog/how-to-call-an-api-from-an-email/
3•crcastle•45m ago•0 comments

"Long-Term Support" doesn't mean what you think

https://pointieststick.com/2026/05/23/long-term-support-doesnt-mean-what-you-think/
3•jandeboevrie•47m ago•0 comments

2of3: Enter a secret. Get 3 cards

https://2of3.ente.com
3•anandbaburajan•49m ago•0 comments

SpaceX, OpenAI and Anthropic IPOs set to test limits of AI boom

https://www.ft.com/content/ae9bb47d-bd1d-473c-b4c5-abae0420cc12
1•1vuio0pswjnm7•52m ago•1 comments

Dark trades' risk destroying London's stock markets

https://www.thetimes.com/business/companies-markets/article/dark-trades-risk-destroying-stock-mar...
3•petethomas•53m ago•0 comments

BNoise – The Easiest Music Maker

https://bnoise.pages.dev/
3•telui•53m ago•1 comments

Hacker Typer – Hacker Screen

https://startuplaunchpage.com/hacker-typer
2•vnyarongi•56m ago•0 comments

Reddit stock drops almost 6%, Meta launches standalone app for online forums

https://www.cnbc.com/2026/05/22/reddit-stock-drops-after-meta-launches-forum-app.html
9•1vuio0pswjnm7•1h ago•1 comments

Cleaning Station

https://en.wikipedia.org/wiki/Cleaning_station
3•pvillano•1h ago•1 comments

The phrase "taste is the differentiator" is not beneficial

https://hazn.com/please-stop-repeating-is-the-differentiator
2•hazn•1h ago•0 comments

Fauxx – Data poisoning for your everyday tracking

https://github.com/digital-grease/fauxx
1•vidyesh•1h ago•0 comments

Amazon Web Services – Four Years and Out

https://www.adventuresinoss.com/aws-four-years/
48•RyeCombinator•1h ago•6 comments

What does grep stand for, and the 75 year history of the regular expression

https://mart.traagel.dev/blog/what-does-grep-stand-for/
1•sonabinu•1h ago•0 comments

Commodity Intelligence

https://contraptions.venkateshrao.com/p/commodity-intelligence
2•swolpers•1h ago•0 comments

British power prices are increasingly independent from gas

https://ember-energy.org/latest-insights/british-power-prices-are-increasingly-independent-from-gas/
1•helsinkiandrew•1h ago•0 comments