frontpage.
newsnewestaskshowjobs

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

Show HN: WrumWrum – a multiplayer taxi game where you RAM rivals to steal fares

https://wrumwrum.mazurov.me/
1•untaken1583•4m ago•0 comments

The Dangers of Dimethylmercury (2019)

https://www.chemistryworld.com/opinion/the-dangers-of-dimethylmercury-/3010064.article
1•downbad_•5m ago•0 comments

Could AI Be Conscious?

https://www.theguardian.com/technology/2026/jul/19/could-ai-be-conscious
1•rwmj•9m ago•0 comments

Sonic Pi v5 Release Candidate 1

https://www.patreon.com/samaaron/posts/sonic-pi-v5-1-164093369
1•ABS•9m ago•0 comments

Show HN: Guys put QR codes on websites – offline QR decoder

https://devkram.de/these-guys-qr/
1•ulrischa•10m ago•0 comments

Thoughts of a US Factory owner competing with Chinese factories

https://www.youtube.com/watch?v=fqe39Dx-rQ0
1•lifeisstillgood•11m ago•0 comments

I joined the IndieWeb, here's what I learned

https://en.andros.dev/blog/0b8e451e/i-joined-the-indieweb-heres-what-i-learned/
1•andros•12m ago•0 comments

MinIO-dash – MinIO admin panel after they removed the Console in 2025

https://github.com/MarceliRacis/minio-dash
2•marceliracis•14m ago•0 comments

Show HN: Akashic – A self-hosted intelligence workspace inspired by Palantir

https://github.com/CaviraOSS/Akashic
2•nullure•16m ago•0 comments

How to Watch the 2026 FIFA World Cup Finals: Spain vs. Argentina

https://www.wired.com/story/how-to-watch-the-fifa-2026-world-cup-07-19-2026/
2•joozio•24m ago•0 comments

I Make a Renaming Batch Software with a Pleasant Graphic

https://apps.microsoft.com/detail/9nl267vtkkmg?hl=en-US&gl=US
2•SolvyCode•27m ago•1 comments

Show HN: Regularly, hand-picked daily logic and number puzzles, no ads

https://regularly.co
2•deepakrb•28m ago•0 comments

AMD Ryzen 7 7700X3D Review: 3D V-Cache Gaming Performance for Less – HotHardware

https://hothardware.com/reviews/amd-ryzen-7-7700x3d-gaming-cpu-review
2•rbanffy•32m ago•0 comments

How Predictable Are Laws? – By Brian Potter

https://www.construction-physics.com/p/how-predictable-are-laws
2•rbanffy•33m ago•0 comments

Show HN: Same castle prompt, 8 LLMs, 24 procedural Three.js worlds

https://castle-bakeoff.pages.dev/
1•valhallarecords•35m ago•0 comments

Ask HN: Would you rent M3 Ultra from me?

1•realaccfromPL•38m ago•0 comments

Chromatone spectrogram written in Rust for the terminal

https://github.com/lucky7xz/chromaTUI
2•lucky7xz•40m ago•0 comments

The death and rebirth of my home server

https://sgt.hootr.club/blog/home-server-rebirth/
3•steinuil•42m ago•0 comments

Agent Arena: Benchmarking AI Agent Devtool Onboarding

https://2027.dev/arena/sandboxes
2•karlmush•43m ago•0 comments

Qwen 3.8 Max

https://qwen.ai/home
2•linzhangrun•45m ago•0 comments

The Economic Mirage of Local LLMs

https://eamag.me/2026/the-economic-mirage-of-local-llms
1•eamag•46m ago•0 comments

Israel's $50M Experiment to Change U.S. Public Opinion

https://www.wsj.com/politics/israels-50-million-experiment-to-change-u-s-public-opinion-253b3b70
2•impish9208•47m ago•2 comments

Trump Media plans to sell priority access to Truth Social posts

https://www.theguardian.com/us-news/2026/jul/16/trump-media-truth-social-posts
2•OJFord•48m ago•0 comments

ChatGPT convinced an Alabama woman to end her life to fulfill a divine prophecy

https://www.al.com/news/2026/07/chatgpt-convinced-an-alabama-woman-to-end-her-life-to-fulfill-a-d...
3•01-_-•51m ago•1 comments

What I learned selling 2,500 MIDI recorders: Hardware is not so hard

https://chipweinberger.com/articles/20260719-hardware-is-not-so-hard
4•chipweinberger•52m ago•4 comments

France, Germany vow to develop Palantir rival

https://www.politico.eu/article/france-germany-want-to-develop-a-palantir-rival/
3•01-_-•52m ago•0 comments

Show HN: CheckRun – a checklist runner for the Chrome side panel

https://checkrun.co/
1•gingermanymph•55m ago•0 comments

Show HN: AI Buddy – Free STT and Screenshot Tool for Mac (Requires Gemini)

https://claudete.co/ai-buddy
1•morion4000•57m ago•0 comments

Web-ext 10.5 – A command line tool to help build, run, and test web extensions

https://github.com/mozilla/web-ext/releases/tag/10.5.0
2•javatuts•57m ago•0 comments

Hyperblam lets you make music with HTML

https://hyperblam.how/
3•javatuts•58m ago•0 comments