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

The Weak Foundations of AI Doomsday

https://www.aipanic.news/p/the-weak-foundations-of-ai-doomsday
1•dotcoma•1m ago•0 comments

Show HN: OpenWand – A mission to remove chat interface from working with AI

https://github.com/SunnyLich/OpenWand
1•OpenWand•8m ago•0 comments

AI Actress interviewed by Piers Morgan [video]

https://www.youtube.com/watch?v=x4yyBWkYSHs
1•pier25•9m ago•0 comments

I Built AI Agents That Ask Companies to Delete Their Data. Most Never Answered

https://medium.com/@stem-education/i-built-ai-agents-that-ask-companies-to-delete-their-data-most...
1•complyyio•11m ago•0 comments

Confessions of an Unrepentant Slop Snob

https://charity.wtf/p/confessions-of-an-unrepentant-slop
1•zdw•14m ago•0 comments

Technitium DNS Server v15.5 Released

https://github.com/TechnitiumSoftware/DnsServer/blob/master/CHANGELOG.md
1•feldrim•15m ago•0 comments

I captured 72 hours of idle Android packets behind pfSense

https://www.praveentechworld.com/research/degoogle-telemetry-2026
3•youngmanyk•16m ago•1 comments

Measure internet censorship. Contribute to the largest open dataset

https://ooni.org/install
3•Bluestein•19m ago•0 comments

OpenAI and Anthropic oversold AI security breaches

https://nypost.com/2026/09/19/us-news/openai-anthropic-oversold-security-breaches-to-pressure-fed...
9•hei-lima•20m ago•2 comments

Collateral Damage of IP-Based Blocking During LaLiga Football Streaming

https://ooni.org/post/2026-laliga-collateral
2•Bluestein•21m ago•0 comments

Quick notes from teaching technical profiles how to talk in public

https://www.lesswrong.com/posts/nKsyMfNsAuTrxmjmi/quick-notes-from-teaching-technical-profiles-ho...
1•wslh•22m ago•0 comments

KdK Part 5: The Aitkenator

https://nealstephenson.substack.com/p/kdk-part-5-the-aitkenator
1•peteforde•24m ago•0 comments

Statement on Superintelligence (2025)

https://superintelligence-statement.org
3•etoulas•24m ago•0 comments

Founding Engineer, AI and Full-Stack

https://bettrlife.ai/founding-engineer
1•jillforBTRL•27m ago•1 comments

Notebook interpolates smoothly between projections of the globe

https://observablehq.com/@d3/projection-transitions
1•joebig•29m ago•0 comments

Show HN: MP3 to MIDI Lab – Convert MP3/WAV to MIDI in the Browser

https://mp3tomidilab.com/
1•liweipt•29m ago•0 comments

Elegant Shape of Eiffel Tower Solved Mathematically by CU-Boulder Prof (2005)

https://www.colorado.edu/today/2005/01/04/elegant-shape-eiffel-tower-solved-mathematically-cu-bou...
2•floweronthehill•30m ago•0 comments

Bytemail – One-time-purchase native email client for macOS (no subscription)

https://bytemailapp.com
1•karakhanyans•31m ago•0 comments

Programming languages hit a decade low on Hacker News

https://www.orangecrumbs.com/stories/programming-languages
1•oyster143•31m ago•0 comments

Curated list of hosting (VPS, GPU, infra, AI)

https://github.com/dalisoft/awesome-hosting
1•dalisoft•34m ago•0 comments

How I see software dev in AI era

https://dhilst.github.io/2026/09/19/sweng-as-opt-prob/
3•geckones•35m ago•0 comments

The End of Upward Mobility

https://www.noemamag.com/the-end-of-upward-mobility/
3•Gooblebrai•35m ago•0 comments

Divide by Depth for Instant 3D

https://gabrieloc.com/2026/09/15/perspective.html
2•gabrieloc•37m ago•1 comments

PC ports of old console games are the new AI vibe coding battleground

https://www.pcgamer.com/gaming-industry/pc-ports-of-old-console-games-are-the-new-ai-vibe-coding-...
3•adunk•37m ago•0 comments

Detecting and mitigating a multi-stage AiTM phishing and BEC campaign (2023)

https://www.microsoft.com/en-us/security/blog/2023/06/08/detecting-and-mitigating-a-multi-stage-a...
3•colinprince•39m ago•0 comments

How the incident happened: a play in one act

https://surfingcomplexity.blog/2026/09/19/how-the-incident-happened-a-play-in-one-act/
4•azhenley•39m ago•0 comments

Show HN: KillSwitch – a programming language designed to be difficult for LLMs

https://killswitch-lang.org
4•dom96•39m ago•1 comments

Escaping Docker's Hypervisor

https://accomplish.ai/blog/escaping-dockers-hypervisor/
2•RohanAdwankar•44m ago•1 comments

Testing Jev as a validation gate for drug-discovery agents

https://frederickparsons.substack.com/p/can-a-fast-ai-gate-catch-chemistry
2•fred_tandemai•45m ago•0 comments

Jevmetrics – probabilistic metric reduction inside OpenTelemetry

https://github.com/ishantanu/jevmetrics
3•ishantanu10•45m ago•0 comments