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

Illegal Frequencies: How Pirate Radio Gave Voice to the Underground (2025)

https://www.decodedmagazine.com/illegal-frequencies-how-pirate-radio-gave-voice-to-the-undergroun...
1•dijksterhuis•1m ago•0 comments

Défi à la Cryptanalyse Classique

https://ttu-bounty-challenge.streamlit.app/
1•BANGEBE•1m ago•1 comments

What Would Marx Say Today?

https://tantaman.substack.com/p/what-would-marx-say-today
1•tantaman•11m ago•0 comments

The Robotics Data Pareto Frontier

https://vincentliu.org/the-robotics-data-pareto-frontier
1•lairv•13m ago•0 comments

Intra: Design notes on an LLM-driven text adventure

https://ianbicking.org/blog/2025/07/intra-llm-text-adventure
1•wellpast•18m ago•0 comments

Why Are There No Holes Around Trees? [video]

https://www.youtube.com/watch?v=pHJIhxZEoxg
1•gmays•18m ago•0 comments

From Breadboard to Perf Board (#1) – Adding a Reset Button, Learning to Solder

https://www.youtube.com/watch?v=MwOPuDMKuwQ
1•tomasantunes•18m ago•0 comments

Sveltia CMS Saved My Blog

https://alexover.dev/articles/how-sveltia-cms-saved-my-blog/
1•alexoverdev•19m ago•1 comments

Introducing the Agents tab in your repository

https://github.blog/changelog/2026-01-26-introducing-the-agents-tab-in-your-repository/
1•soheilpro•21m ago•0 comments

Andrej Karpathy (Inspired) Skills

https://github.com/forrestchang/andrej-karpathy-skills
1•sdoering•23m ago•0 comments

Dollar falls after Trump comments

https://www.axios.com/2026/01/27/trump-dollar-currency-yen
7•doener•24m ago•0 comments

CDC vaccination databases have been frozen under RFK Jr

https://arstechnica.com/health/2026/01/rfk-jr-lets-cdc-vaccination-data-rot-dozens-of-databases-f...
7•doener•25m ago•0 comments

Roo Code 3.44 Release Updates – Worktrees (new) – Parallel tool calls

https://docs.roocode.com/update-notes/v3.44
1•hrudolph•30m ago•1 comments

Six Psychological Flaws That Keep the Gifted from Living Up to Their Gift

https://www.themarginalian.org/2026/01/24/diseases-of-the-will-cajal-advice-for-a-young-investiga...
2•cainxinth•33m ago•0 comments

EU and Brazil conclude agreements on free and safe data flows

https://ec.europa.eu/commission/presscorner/home/en
2•marcuschong•36m ago•0 comments

Show HN: A simple, transaction-safe SQL migration tool

https://github.com/samueldurantes/siquil
1•samueldurante•37m ago•0 comments

Building multi AI awareness in AI group chats

https://cochat.ai/building-multi-ai-awareness-how-cochat-enables-ai-models-to-coexist-in-group-co...
1•intheleantime•38m ago•2 comments

CVE-2026-23993: JWT authentication bypass in HarbourJwt via "unknown alg"

https://pentesterlab.com/blog/cve-2026-23993-harbourjwt-unknown-alg-jwt-bypass
1•lovedhacker•42m ago•0 comments

PostgreSQL on Kubernetes vs. VMs: A Technical Decision Guide

https://stormatics.tech/blogs/postgresql-on-kubernetes-vs-vms-a-technical-decision-guide
4•ioololaa•43m ago•0 comments

Clawdbot Remembers Everything

https://twitter.com/manthanguptaa/status/2015780646770323543
1•jxmorris12•44m ago•0 comments

Ask HN: Block short-form videos on home network?

1•mark13•45m ago•0 comments

Windows 11 KB5074109 update nukes Nvidia gaming performance and stability

https://www.notebookcheck.net/Windows-11-KB5074109-update-nukes-Nvidia-gaming-performance-and-sta...
3•akyuu•45m ago•1 comments

Gladys West, Unsung Figure in Development of GPS, Dies at 95

https://www.nytimes.com/2026/01/27/science/gladys-west-dead.html
1•donohoe•46m ago•1 comments

TikTok claimed bugs blocked anti-ICE videos, Epstein mentions; experts call BS

https://arstechnica.com/tech-policy/2026/01/tiktok-claimed-bugs-blocked-anti-ice-videos-epstein-m...
14•coloneltcb•47m ago•1 comments

Cursed Units 3: The British Empire Strikes Back [video]

https://www.youtube.com/watch?v=PWbfVcDcfFw
2•nativeit•48m ago•0 comments

Old Insurance Maps – Georeferencing Sanborn Fire Insurance Maps on Modern Maps

https://oldinsurancemaps.net/
1•lapetitejort•48m ago•1 comments

Show HN: An interactive jazz study guide

https://vladris.com/jazz-book/
1•vladris•48m ago•0 comments

Lightweight Transformer Architectures for Edge Devices in Real-Time Applications

https://arxiv.org/abs/2601.03290
1•PaulHoule•49m ago•0 comments

CVE-2026-22709: Critical Sandbox Escape in Vm2 Enables Arbitrary Code Execution

https://www.endorlabs.com/learn/cve-2026-22709-critical-sandbox-escape-in-vm2-enables-arbitrary-c...
2•gnabgib•49m ago•0 comments

The Plan Is to Make the Internet Worse. Forever. – Bastani and Doctorow [video]

https://www.youtube.com/watch?v=7wE8G-d7SnY
5•foofoo4u•49m ago•0 comments