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

Show HN: Metricsense – Turn unstructured user feedback into engineering specs

https://www.metricsense.ai/
1•avestalabs•1m ago•0 comments

The Startup Rush for Europe's New War Chest

https://www.businessinsider.com/europe-defense-tech-startups-founders-vc-boom-funding-deployment-...
1•maxloh•2m ago•0 comments

The Wayland–X11 feud nobody needs

https://www.xda-developers.com/reasons-linux-users-would-stick-with-x11/
1•cumo•3m ago•1 comments

Research: Most Trusted AI Humanizer Tools 2026

https://copywritersforum.com/viewtopic.php?t=1659
1•AngelPower•4m ago•0 comments

Researchers sue X for access to Hungarian election data

https://www.politico.eu/article/hungary-x-viktor-orban-access-to-hungarian-election-data/
3•saubeidl•7m ago•1 comments

CiderStack – Native macOS VM manager, pay once, no subscription

3•ciderdev•8m ago•2 comments

Ask HN: Is there a surge of spam emails slipping past filters across providers?

2•Brajeshwar•10m ago•0 comments

Career Ladder Is Rewarding the Wrong Behavior

https://blog.3squaredcircles.com
2•birdculture•12m ago•0 comments

Adobe Animate Shuts Down

https://www.neowin.net/news/adobe-animate-30-year-old-animation-software-shuts-down-angers-custom...
3•bundie•13m ago•0 comments

Transparent Toilets Take Tokyo's Culture of Hygiene to the Next Level

https://www.architecturaldigest.com/story/transparent-toilets-are-the-latest-invention-from-tokyo...
1•helsinkiandrew•14m ago•0 comments

MenuetOS – a GUI OS that boots from a single floppy disk

https://www.menuetos.net/
2•pjerem•14m ago•0 comments

Operation Sovereignty: Bundestag Plans a Breakthrough from Microsoft and Co

https://www.heise.de/en/news/Operation-Sovereignty-Bundestag-plans-a-breakthrough-from-Microsoft-...
2•novaRom•15m ago•0 comments

Show HN: Keepsanity.ai – an AI newsletter for busy engineers

https://keepsanity.ai
2•mcPear•15m ago•0 comments

Is There Anything Good About Men? (2007)

https://web.archive.org/web/20200506162700/http://www.denisdutton.com/baumeister.htm
2•olalonde•16m ago•0 comments

The Ozzy Tape I Never Played: A Little Piece of Rock History Found in an Attic

https://news.sky.com/story/the-ozzy-tape-i-never-played-a-little-piece-of-rock-history-found-in-a...
1•austinallegro•17m ago•0 comments

I built an offline SEO site auditor for Windows (no SaaS, no tracking)

https://tomdahne.com/site-auditor/
2•ezimedia•18m ago•1 comments

Stay Away from My Trash

https://tldraw.dev/blog/stay-away-from-my-trash
3•EvgeniyZh•25m ago•0 comments

Notepad++ update service hijacked in targeted state-linked attack

https://www.theregister.com/2026/02/02/notepad_plusplus_intrusion/
1•hn_go_brrrrr•28m ago•0 comments

Best AI Detectors in 2026

https://digg.com/ai-detection/iocMcHI/best-ai-detectors-in-2026
1•DukaAgency•32m ago•0 comments

China to ban hidden car door handles on all EVs over crash safety concerns

https://www.theguardian.com/environment/2026/feb/03/china-to-ban-hidden-car-door-handles-evs
4•tempestn•36m ago•2 comments

What Is Ruliology?

https://writings.stephenwolfram.com/2026/01/what-is-ruliology/
1•helloplanets•37m ago•0 comments

Gem Fellowship

https://gem.coop/updates/2026-fellowship/
1•ciconia•39m ago•0 comments

You may not need an MCP server. Just use OpenAPI

https://twitter.com/cahidarda/status/2018479241915146586
1•cahid_arda•42m ago•1 comments

Lol: Vibe Scripting

https://github.com/casey/lol
1•rodarmor•44m ago•0 comments

How does AI impact skill formation?

https://www.seangoedecke.com/how-does-ai-impact-skill-formation/
1•gfysfm•46m ago•0 comments

China bans hidden car door handles over safety concerns

https://www.bbc.com/news/articles/cp37g5nxe3lo
3•kogens•48m ago•1 comments

Plasma Effect

https://www.4rknova.com/blog/2016/11/01/plasma
2•todsacerdoti•52m ago•0 comments

Walter Writes AI

https://walterwrites.ai/
2•DukaAgency•52m ago•0 comments

Free online resume (CV) builder – No registration needed, no paywall

https://www.sartorcv.com/
2•levario_studio•54m ago•0 comments

A Bold Move in the AI Age: The ProjectDiscovery OSS Bounty Program

https://github.com/projectdiscovery/oss-bounty-program
2•dns•56m ago•1 comments