frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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

Donald Trump says US may take equity stakes in AI companies

https://www.ft.com/content/b1ab6106-77e6-4218-9eb4-e44bd56ca400
3•root-parent•5m ago•1 comments

AI Agents Now Generate More Web Traffic Than Humans

https://www.cnet.com/tech/services-and-software/its-official-agentic-bots-surf-the-web-more-than-...
2•Fake4d•7m ago•0 comments

OpenAI wrote a guide on how to use /goal mode. I made that guide into a skill

https://github.com/Infinite-Labs-OS/infinite-skills
1•RiverXR•7m ago•0 comments

OpenAI Codex Tech Lead Does AI-Assisted Engineering

https://newsletter.eng-leadership.com/p/how-openai-codex-tech-lead-does-ai
1•gregorojstersek•9m ago•0 comments

Voyd Programming Language v0.2.0 – Effect typing improvements, trailing closures

https://voyd.dev/docs/?p=releases
1•drew-y•9m ago•0 comments

P/E Tells You the Price. Reality Gap Tells You the Delusion

https://hstre.github.io/Reality-Gap/
2•hstrex•10m ago•0 comments

Morgan Stanley Sees SpaceX's Revenue Reaching $3.4T in 2040

https://www.wsj.com/finance/banking/morgan-stanley-sees-spacexs-revenue-reaching-3-4-trillion-in-...
2•logicalfails•10m ago•1 comments

Hacker News, Sans AI

https://elijahpotter.dev/articles/hacker-news-sans-AI
2•chilipepperhott•10m ago•0 comments

We built an AI sales agent so you don't have to give every demo of your product

https://salescloser.ai/hybrid-chat-va/
1•jrda•10m ago•3 comments

Saylor's Strategy Sells Bitcoin for First Time Since 2022

https://www.wsj.com/finance/currencies/saylors-strategy-sells-bitcoin-for-first-time-since-2022-0...
1•JumpCrisscross•11m ago•0 comments

Playwright for Godot

https://github.com/mrf/godot-stagehand
1•markferree•12m ago•1 comments

Meta backs off tracking workers' keystrokes after they revolt

https://boingboing.net/2026/06/03/meta-backs-off-tracking-workers-keystrokes-after-they-revolt.html
2•DropDead•12m ago•2 comments

Scale Kubernetes deployments to zero using KEDA

https://mijndertstuij.nl/posts/scale-to-zero-keda-cron-scaler/
1•speckx•23m ago•0 comments

Open Source, Co-Ops and a History of Bias in Corporate America

https://radicaltherapy.substack.com/p/open-source-co-ops-and-a-history
2•glind72•23m ago•0 comments

Department of Energy Celebrates First Advanced Reactor Criticality

https://www.energy.gov/articles/department-energy-celebrates-first-advanced-reactor-criticality
1•geox•26m ago•0 comments

Scientists Gave Cocaine to Salmon and You Will Believe What Happened

https://www.wired.com/story/cocaine-fueled-wild-salmon-swam-twice-as-far-as-sober-ones/
1•PaulHoule•27m ago•0 comments

Granite Switch: Building AI more like software

https://research.ibm.com/blog/granite-libraries-project-switch
1•yangikan•29m ago•0 comments

Bonsai Browser: Reader-mode for every page, powered by a local LLM, Nothing Else

https://drive.google.com/drive/folders/1qDYvycW4Ki0gAppMGhvSixUCioIRXcmN
2•coolwulf•29m ago•0 comments

Show HN: OWASP VulnerableApp Modern Extensible and Scalable vulnerable app

https://github.com/SasanLabs/VulnerableApp
2•newaccount12344•29m ago•0 comments

The Anatomy of a Learning Stall

https://tagide.com/blog/llm/the-anatomy-of-a-learning-stall/
1•azhenley•30m ago•0 comments

Siddhartha (1922): Competence Porn – before it was cool

https://acxreviews.robennals.org/reviews/siddhartha-1922-by-hermann-hesse
3•Gooblebrai•30m ago•0 comments

The Man Whose Job Is Making Sure We Don't Have Blackouts This Summer

https://www.wsj.com/business/blackouts-electricity-data-centers-david-mills-pjm-d1c499fe
1•impish9208•31m ago•1 comments

I Just watched "We just launched Paxel" by narrated by Garry Tan [video]

https://www.youtube.com/shorts/ywS7Ytkx3A0
1•mockingloris•31m ago•2 comments

Do I Need to Learn the Domain? Do I Want To?

https://ianmcnaughton.net/blog/do-i-need-to-learn-the-domain/
1•wc_nomad•32m ago•0 comments

I am getting sick and tired of our AI oligarchs

https://news.ycombinator.com/from?site=eversoleken.substack.com
2•kennethops•34m ago•1 comments

The Legacy of Spam

https://siderite.dev/blog/legacy-of-spam
2•speckx•34m ago•0 comments

China builds an economic fortress as global tensions rise

https://www.nytimes.com/2026/06/05/business/china-investment-rules.html
3•leonidasrup•34m ago•0 comments

Lateos/NPM-scan v1.2.0: Detecting Native Addon Malware (node-gyp Abuse)

https://github.com/lateos-ai/npm-scan/blob/main/VALIDATION.md
1•lateos-ai•35m ago•1 comments

Show HN: I rebuilt a tiny old volleyball game I loved

https://volleyhop.com/
2•cebceb•37m ago•1 comments

Reason Behind a Startup's Success

https://orchidfiles.com/reason-behind-startups-success/
1•theorchid•38m ago•0 comments