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

OpenAI API Is Down

1•whyage•2m ago•0 comments

Fail-closed enforcement for AI agents: deny what you cannot verify

https://github.com/Fame510/SHACKLE
1•SHACKLE-PRO-•2m ago•0 comments

Show HN: PGP Manager – a modern, user-friendly alternative to Kleopatra

https://github.com/developaaah/pgp-manager
1•developaaah•3m ago•0 comments

MAI-Image-2.5-Pro and MAI-Voice-2-Flash

https://microsoft.ai/news/introducing-mai-image-2-5-pro-and-mai-voice-2-flash/
2•ai2027•3m ago•0 comments

AMD's Instinct MI455X: Aiming for the Sun

https://chipsandcheese.com/p/amds-instinct-mi455x-aiming-for-the
1•pixelpoet•5m ago•0 comments

Godot: Command Line Tutorial

https://docs.godotengine.org/en/stable/tutorials/editor/command_line_tutorial.html
1•evolve2k•5m ago•0 comments

We self-host DeepSeek V4 Flash on AWS spot instances

https://twitter.com/Vercantez/status/2080326597757087859
1•skeptrune•5m ago•0 comments

Industrial Society and Its Future (Text of Unabomber Manifesto)

https://archive.nytimes.com/www.nytimes.com/library/national/unabom-manifesto-1.html
2•pcfwik•5m ago•0 comments

Qwen 3.8-Max: Interviewing the AI About Itself

https://manish.sh/writings/models/inside-qwen-3-8-max-preview-reverse-engineering-an-ai-assistant...
2•ms7892•8m ago•0 comments

Augmental MouthPad is a tongue-controlled touchpad/trackpad

https://www.cnx-software.com/2026/07/23/augmental-mouthpad-tongue-controlled-touchpad-trackpad/
2•jandeboevrie•9m ago•1 comments

You don't need an LLM to cluster LLM traces

https://seldon-ai.com/blog/you-dont-need-an-llm-to-cluster-llm-traces
1•nlpnerd•9m ago•0 comments

Show HN: Syncle – Open-source real-time database synchronization engine

https://github.com/osmanahmadxai/SYNCLE
2•osmanahmadxai•9m ago•0 comments

I use the GPL and not Cuck Licenses

https://lukesmith.xyz/articles/why-i-use-the-gpl-and-not-cuck-licenses/
1•tiagod•9m ago•0 comments

Shitty – A New Terminal Emulator

https://github.com/pg83/shitty
1•zX41ZdbW•16m ago•0 comments

Quests

https://theliquidfrontier.leaflet.pub/3mrddkznuuc2g
1•_tk_•18m ago•0 comments

Ali Baba and the Forty Relying Parties

https://www.jotaen.net/G3zzX/ali-baba-and-the-40-relying-parties/
1•jotaen•20m ago•0 comments

Show HN: BDFL – Open-source supervisor for Codex and Claude Code

https://usebdfl.com/
1•thisisnsh•20m ago•3 comments

Casberi – Your apps, one feed. Private, on-device, no servers

https://paragraph.com/@accountless/casberi-your-apps-one-feed
1•alexchopan•22m ago•0 comments

Tesla swapped a solar owner's lease contract for the Book of Enoch

https://electrek.co/2026/07/23/tesla-solar-lease-contract-book-of-enoch/
2•Bender•22m ago•1 comments

Bison Biologist: Yellowstone Bulls Are Extra Ornery Because They're in a Rut

https://cowboystatedaily.com/2026/07/22/bison-biologist-yellowstone-bulls-could-be-extra-ornery-b...
1•Bender•24m ago•0 comments

Xbox introduces ad-supported free game streaming for Xbox, available for testers

https://news.xbox.com/en-us/2026/07/23/game-streaming-ad-supported-xbox-insiders/
2•Tiberium•24m ago•0 comments

Google Discloses $94.1B in SpaceX Stock, Marking 6% Stake

https://www.wsj.com/tech/google-discloses-94-1-billion-in-spacex-stock-marking-6-stake-91655d7c
2•2OEH8eoCRo0•26m ago•0 comments

Utilities Join Trump Pledge to Limit AI-Driven Increases in Electricity Bills

https://www.wsj.com/politics/policy/trump-pledge-to-limit-ai-driven-electric-bill-increases-attra...
4•geox•28m ago•0 comments

Fedora 45 Atomic Desktops Look to Allow for Web-Based Remote Installations

https://discussion.fedoraproject.org/t/f45-change-proposal-web-based-remote-installation-support-...
6•DemiGuru•28m ago•0 comments

Microsoft 365 outage affects Teams, SharePoint and other services

https://www.bleepingcomputer.com/news/microsoft/microsoft-365-outage-affects-teams-sharepoint-and...
5•saikatsg•29m ago•0 comments

Firefox 153 contains itself while Thunderbird 153 fixes almost everything

https://www.theregister.com/software/2026/07/23/firefox-153-contains-itself-while-thunderbird-153...
2•Bender•29m ago•0 comments

The Founder Market Fit

https://www.veradiverdict.com/p/the-founder-market-fit-thesis
2•wslh•31m ago•0 comments

An influx of salt may affect microbial ecosystems

https://news.mit.edu/2026/how-influx-salt-may-affect-microbial-ecosystems-0717
1•andrewstetsenko•32m ago•0 comments

Show HN: Twing, A Programmable Inbox

https://twing.dev/
2•imayank•32m ago•1 comments

In-House LLM Serving at Netflix

https://netflixtechblog.com/in-house-llm-serving-at-netflix-a5a8e799ea2c
3•gmays•32m ago•0 comments