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

Show HN: Worldle Game, but Multiplayer Version

https://landfall.manojvivek.workers.dev
1•manojvivek•46s ago•0 comments

Instagram, Ritz-Carlton, Bourbon

https://www.marginpoints.com/issues/instagram-ritz-carlton-bourbon
1•historian1066•3m ago•0 comments

How to Prepare for Chat Control

https://homehack.nl/how-to-prepare-for-chat-control/
2•speckx•6m ago•0 comments

See How Trump's Truth Social Posts Move Stocks

https://www.wsj.com/politics/policy/see-how-trumps-truth-social-posts-move-stocks-5ee3611b
3•thm•7m ago•1 comments

OpenEvidence is bribing spouses of CMI and Genentech leadership

3•mdpartner•9m ago•0 comments

Chessperiment – Create and play custom chess variants in the browser

https://chessperiment.app/en
1•ItzMassel•10m ago•0 comments

Ancient Princesses Were Weapon-Wielding Badasses, Scientists Discover

https://www.404media.co/ancient-princesses-were-weapon-wielding-badasses-scientists-discover/
2•Brajeshwar•10m ago•0 comments

Show HN: RL Environment for Sheep Hearding

https://github.com/midhunharikumar/sheepdog-rl
1•blackboattech•12m ago•0 comments

Show HN: Textcaster, a feeds-native social timeline you can self-host

https://textcaster.app
1•rmdes•16m ago•0 comments

Nvidia's CMP 170HX Full Compute and Memory (80GB) may be unlockable via exploit

https://old.reddit.com/r/LocalLLaMA/comments/1uxqccx/psa_nvidias_cmp_170hx_full_compute_and_memor...
1•qingcharles•17m ago•0 comments

Renovate or Rebuild? Architectural techniques for the million euro tradeoff

https://www.youtube.com/watch?v=8ScSAh0hu0I
1•RebootStr•17m ago•0 comments

Cyberchase: For Parents and Teachers

https://www.pbs.org/parents/shows/cyberchase
2•lioeters•18m ago•0 comments

Anthropic runs like Wile E. Coyote into the brick wall of consciousness research

https://www.theintrinsicperspective.com/p/anthropic-runs-like-wile-e-coyote
3•paulpauper•20m ago•0 comments

Greatest Failures of Orson Welles

https://www.honest-broker.com/p/the-10-greatest-failures-of-orson
1•paulpauper•20m ago•0 comments

Time Is Always Different

https://www.overcomingbias.com/p/this-time-is-always-different
1•paulpauper•21m ago•0 comments

A Few Notes on the Origins of 'Pitmaston Pine Apple'

https://orchardnotes.com/2026/06/04/a-few-notes-on-the-origins-of-pitmaston-pine-apple/
1•wawayanda•21m ago•0 comments

Child's next teacher could be a sex robot

https://gizmodo.com/your-childs-next-teacher-could-be-a-sex-robot-2000787284
2•mikelgan•23m ago•1 comments

Pere Ubu Meets X: The Man with the X-Ray Eyes

https://cinemasojourns.com/2026/07/18/pere-ubu-meets-x-the-man-with-the-x-ray-eyes/
2•jjgreen•24m ago•0 comments

Model Routing Is Simple. Until It Isn't

https://huggingface.co/blog/ibm-research/model-routing-is-simple-until-it-isnt
2•gmays•24m ago•0 comments

Heresy

https://paulgraham.com/heresy.html
16•appreciatorBus•26m ago•6 comments

If you don't have MCP for your app/service – you're missing out

https://old.reddit.com/r/SaaS/comments/1uzhus8/if_you_dont_have_mcp_for_your_saas_youre_missing/
1•astashov•27m ago•0 comments

Email Patch Review Tool for Thunderbird

https://mccd.space/posts/26-07-18/3-patch-review-tool-for-thunderbird
1•WhyNotHugo•31m ago•0 comments

Show HN: Talon – a self-hosted harness for long-lived AI agents

https://github.com/dylanneve1/talon
1•claudiusthebot•34m ago•0 comments

Young adults are poor despite every metric which suggests otherwise

https://xcancel.com/i/article/2077113148524417439
24•like_any_other•38m ago•27 comments

Amp – Subscriptions at Last

https://ampcode.com/news/subscriptions
1•monty5811•38m ago•0 comments

Netflix Paid $587M for Ben Affleck's AI Startup InterPositive

https://variety.com/2026/film/news/netflix-paid-587-million-ben-affleck-ai-interpositive-1236815111/
3•andsoitis•39m ago•0 comments

Show HN: I made a LeetCode tracker that looks like Hacker News

https://leet150.vercel.app/
1•joudbitar•40m ago•0 comments

Show HN: OpenCareLoop - Solve your family's health, one loop at a time.

https://karankurani.github.io/OpenCareLoop/
1•BIackSwan•41m ago•0 comments

DOOMQL – Game Engine in SQL

https://github.com/petergpt/doomql
2•andsoitis•41m ago•0 comments

Setting up your spare Mac for Claude Code to control, a step-by-step guide

https://ykdojo.github.io/claude-controls-mac/
30•ykev•46m ago•3 comments