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

Billionaires Punched in the Nose over Paramount-Warner

https://www.thebignewsletter.com/p/boom-billionaires-punched-in-the
1•chmaynard•47s ago•0 comments

Has Anyone Tried Bittensor?

https://www.bittensor.com/docs
1•anoop_kumar•1m ago•0 comments

Milepost – plain-Markdown long-term memory for Claude Code

https://github.com/sashamitrovich/milepost
1•sashamitrovich•2m ago•0 comments

Probe into explosive diarrheal cases points to Taco Bell and bad lettuce

https://arstechnica.com/health/2026/07/taco-bell-eyed-in-explosive-diarrheal-outbreak-leafy-green...
1•rbanffy•2m ago•0 comments

Show HN: TormentNexus – Open-source AI control plane with 26K+ MCP tools

https://github.com/MDMAtk/TormentNexus
1•RobertPelloni•2m ago•0 comments

How to Stay in the Coding Flow Using LLMs

https://jamesoclaire.com/2026/07/15/how-to-stay-in-the-coding-flow-using-llms/
1•ddxv•3m ago•1 comments

Nobody knows what a used GPU cluster is worth

https://ciphertalk.substack.com/p/nobody-knows-what-a-used-gpu-cluster
1•rbanffy•4m ago•0 comments

How to Connect ChatGPT to Stock Data

https://financialdata.net/chatgpt-stock-data
1•_FDN_•6m ago•0 comments

OpenAI's First Device Will Be Movable, Screenless Speaker

https://www.bloomberg.com/news/articles/2026-07-14/openai-s-first-device-will-be-moveable-screenl...
1•dlx•7m ago•1 comments

Patch the patch: things you do when stuck on Kirkstone

https://thinkingtoasters.com/2026/07/14/patch-the-patch-things-you-do-when-you-miss-the-update-tr...
1•yesiot•12m ago•0 comments

Cura: Specialized 1T model for agentic healthcare

https://actava.ai/cura
1•Raven603•13m ago•0 comments

Show HN: ZeroGate – A Fuzzy CSV Reconciler

https://zerogate.cloud
1•ngarner•14m ago•0 comments

Who's running all those tiny RPKI servers?

https://blog.apnic.net/2026/07/15/whos-running-all-those-tiny-rpki-servers/
1•enz•16m ago•0 comments

LegacyHive: Windows user profile service arbitrary hive load elevation of priv

https://github.com/MSNightmare/LegacyHive
2•marak830•18m ago•1 comments

Musk: "All user data that was uploaded to SpaceXAI before now will be deleted"

https://twitter.com/elonmusk/status/2076739687658496209
1•JumpCrisscross•24m ago•0 comments

German media regulator says Google's AI Overviews subject to German media law

https://www.reuters.com/legal/government/german-media-regulator-says-googles-ai-overviews-subject...
1•1vuio0pswjnm7•25m ago•0 comments

Where authorities are restricting data centres amid AI boom

https://www.reuters.com/legal/litigation/where-authorities-are-restricting-data-centres-amid-ai-b...
1•1vuio0pswjnm7•26m ago•0 comments

I tricked Claude into leaking your deepest, darkest secrets

https://www.ayush.digital/blog/the-memory-heist
3•macleginn•27m ago•0 comments

UK plans default midnight social media curfew for 16- and 17-year-olds

https://www.reuters.com/technology/uk-plans-default-midnight-social-media-curfew-16-17-year-olds-...
1•1vuio0pswjnm7•28m ago•1 comments

TypeWhisper – open-source dictation and workflows for macOS and Windows

https://github.com/TypeWhisper/typewhisper-mac
1•theturtletalks•37m ago•0 comments

Stripe and Advent make $53B bid for PayPal

https://www.ft.com/content/3738e814-9470-4d7d-94a6-ac5e001a968e
2•JumpCrisscross•37m ago•0 comments

What the Middle Ages can teach us about preventing burnout

https://www.bbc.com/culture/article/20260713-what-the-middle-ages-can-teach-us-about-burnout
1•1659447091•37m ago•0 comments

Billionaires who fled California wealth tax risk intrusive residency audit

https://www.ft.com/content/3fb5fa27-ba9e-44e6-a56a-a347b515cdb6
1•JumpCrisscross•38m ago•0 comments

DeepSeek prepares for IPO filing as soon as 2026, eyes US$71B valuation: FT

https://www.businesstimes.com.sg/startups-tech/technology/deepseek-prepares-ipo-filing-soon-2026-...
2•doppp•42m ago•0 comments

Sailboxes: Cloud environs for long horizon AI

https://www.sailresearch.com/blog/sailboxes-general-access
1•handfuloflight•43m ago•0 comments

Show HN: atradio.fm – A social internet radio platform built on Bluesky ATProto

https://tangled.org/atradio.fm/atradio
1•tsiry•44m ago•0 comments

Quaternion small language-model comparison

https://github.com/ibackstrom/QuartAI
1•ibackstrom•46m ago•0 comments

The Fake Architecture of the Film World (2018)

https://www.ferrovial.com/blog/en/2018/03/the-fake-architecture-of-the-film-world/
1•andsoitis•48m ago•0 comments

RISC-V Is Inevitable: State of the Union Keynote Argues

https://www.eetimes.com/risc-v-is-inevitable-state-of-the-union-keynote-argues/
4•signa11•52m ago•0 comments

The Prompt-Wait-Evaluate Loop: How AI Kills Flow Without You Noticing

https://www.sandordargo.com/blog/2026/07/15/how-ai-kills-flow
2•jandeboevrie•53m ago•0 comments