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

Microsoft says its AI tool is better than doctors at diagnosing conditions

https://zordt.com/
1•vchilkuri•1m ago•0 comments

Someone leaked a Mass Effect 5 trailer and now I feel worse

https://www.pcgamer.com/games/mass-effect/someone-leaked-a-mass-effect-5-trailer-and-now-i-feel-e...
1•evo_9•2m ago•0 comments

Nvidia launches Minerva to catch failing parts in giant AI data centres

https://thenextweb.com/news/nvidia-minerva-aiops-ai-factory-monitoring
2•PicardManeuver•4m ago•0 comments

Electron microscope- What it takes to run in your garage

https://www.youtube.com/watch?v=wD1YGVwL418
2•oliculipolicula•5m ago•0 comments

This I Believe

https://www.awakin.org/v2/read/view.php?tid=468
1•ctoth•6m ago•0 comments

Building Laminar: Ramp's Managed Agents Platform

https://builders.ramp.com/post/building-laminar
1•gmays•7m ago•0 comments

Show HN: bonds – not an agent, a friend with superpowers for Gen Z group chats

https://bonds.chat/
1•juanchoabdon•23m ago•1 comments

Reverse Engineered Onshape for MCP Server

https://github.com/godbrigero/onshape-native
2•godbrigero•28m ago•1 comments

Nvidia Ampere GPUs got unlocked/exploited

https://github.com/Zagitta/gpu-unlock/blob/main/docs/How%20Ampere%20was%20unlocked.md
1•Zagitta•28m ago•0 comments

Meta's Hunt for AI Capital Strikes a Raw Nerve on Wall Street

https://www.wsj.com/finance/stocks/metas-hunt-for-ai-capital-strikes-a-raw-nerve-on-wall-street-e...
3•cdrnsf•36m ago•0 comments

We Spoke with Entrepreneurs Living the "7 Vibe 3" Lifestyle

https://cadence.moe/blog/2026-09-10-we-spoke-with-entrepreneurs-living-the-7-vibe-3-lifestyle
1•Cknight70•43m ago•2 comments

Humming: Fast, Flexible Kernels for Quantized Inference

https://vllm.ai/blog/2026-10-21-humming
1•gmays•43m ago•0 comments

Red-Teaming OpenAI's Internal Agent Monitoring Systems

https://blog.redwoodresearch.org/p/red-teaming-openais-internal-agent
1•btown•44m ago•0 comments

Offline FairPlay DRM Decryption

https://github.com/EthanArbuckle/fairplay-decrypt
1•sjtgraham•47m ago•0 comments

AI Keeps Getting Better. Why Is Its Writing Still So Bad?

https://greyenlightenment.com/2026/10/21/ai-keeps-getting-better-why-is-its-writing-still-so-bad/
2•paulpauper•49m ago•1 comments

The State of PyTorch 2026

https://techstrong.ai/articles/the-state-of-pytorch-2026/
1•CrankyBear•50m ago•0 comments

XRP Ledger Fixes Lending Code Before the Feature Goes Live

https://coinmarketcap.com/community/post/380272949/
1•joeymabia1•51m ago•1 comments

Intel tour by Dwarkesh: What will computer chips look like in 2045?

https://www.dwarkesh.com/p/intel-tour
1•osnium123•53m ago•0 comments

Untold: Iran

https://www.untoldart.com/venice
1•linuxkernal•54m ago•0 comments

Musk Giving Tops $445M in Midterm Election Push for GOP

https://www.bloomberg.com/news/articles/2026-10-23/musk-giving-tops-445-million-in-midterm-electi...
9•pulisse•55m ago•0 comments

Quest Diagnostics (Hacked)

https://www.questdiagnostics.com/links/quanum-notice
2•tortilla•55m ago•1 comments

PointerCam, a screen recorder that zooms on clicks and writes guides

https://pointercam.com/
2•rhrahul•56m ago•0 comments

A tale of two PHP remote vulnerabilities

https://calif.io/php2shell.x/
1•wyclif•57m ago•1 comments

Go++

https://github.com/jordan-bonecutter/go-plus-plus
1•jordan_bonecut•59m ago•1 comments

Physicists trap a single antimatter particle for a month For the first time

https://www.yahoo.com/news/science/articles/physicists-trap-single-antimatter-particle-150000058....
1•thunderbong•59m ago•0 comments

Demis Hassabis shortens AGI timeline from five to two to three years

https://the-decoder.com/deepmind-founder-hassabis-shortens-agi-timeline-from-five-to-two-to-three...
2•brandonb•1h ago•2 comments

Peter Thiel breaks with Trump over Iran war: 'We should not have done it'

https://www.politico.com/news/2026/10/21/peter-thiel-trump-iran-war-01131284
4•wslh•1h ago•0 comments

Assure – formal verification for every PR

https://symbolia.ai/
2•Veloc1te•1h ago•0 comments

Show HN: Supastack – Cross-Platform Turborepo for Next.js, Expo, and Tauri

https://supastack.dev
1•Learnmore_smart•1h ago•0 comments

CVE Tracker

https://cve.0xosprey.com/
1•mtweak•1h ago•0 comments