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

Java's Project Valhalla lands a preview in JDK 28

https://www.theregister.com/devops/2026/06/15/javas-project-valhalla-finally-lands-a-preview-in-j...
1•pjmlp•23s ago•0 comments

SAMF- Deterministic Moscow guardrails for LLM multi-agent loops

https://github.com/NanoPrompt/samf-framework
1•nanoprompter•5m ago•0 comments

Show HN: SharePad – share a USB iPad as a clean window in any call

https://sharepad.co/
1•jonyardley•8m ago•0 comments

Vellum Studio – Word to PDF Offline Android App

https://play.google.com/store/apps/details?id=com.vertexapp.vellumpdfstudio.app&hl=en_US
1•vertexapps•11m ago•1 comments

The Return of Rigorous Full-System Timing Simulation

https://www.sigarch.org/the-return-of-rigorous-full-system-timing-simulation/
1•matt_d•16m ago•0 comments

AI Agents Enable Adaptive Computer Worms

https://cleverhans.io/worm.html
1•xyzal•16m ago•0 comments

Can open-source beat OpenAI?

https://restofworld.org/2026/tiezhen-wang-china-us-open-source-ai/
5•devonnull•25m ago•0 comments

Show HN: FlashQwen – A from-scratch CUDA inference engine for Qwen3

https://github.com/frankkk96
1•langtang1996•26m ago•0 comments

Visual Studio Code is designed to fracture (2022)

https://ghuntley.com/fracture/
1•Tomte•27m ago•0 comments

How to set a static IP address for an Nginx outbound proxy

https://outboundgateway.com/blogs/nginx-static-ip-outbound-proxy/
1•thomster•35m ago•0 comments

Language integrated LLMs as an OCaml function

https://anil.recoil.org/notes/language-integrated-llms
1•matt_d•40m ago•0 comments

AI Is Not Conscious, but It Is Becoming Our Unconscious

https://theconvivialsociety.substack.com/p/ai-is-not-conscious-but-it-is-becoming
1•mellosouls•42m ago•0 comments

I Could've Rickrolled the FIFA World Cup. All I Needed Was My ID

https://bobdahacker.com/blog/fifa-hack
32•BobDaHacker•42m ago•5 comments

So I built something to listen to customer complaints

https://old.reddit.com/r/SideProject/comments/1u74ern/so_i_built_something_to_finally_listen_to/
1•bishwasbh•44m ago•0 comments

YouTube Cracks Down on AI Slop

https://www.hollywoodreporter.com/business/digital/faceless-creators-youtube-ai-damage-1236617586/
3•l33tbro•45m ago•0 comments

Meet the world's top AI-Pilled Economists

https://www.economist.com/finance-and-economics/2026/06/15/meet-the-worlds-top-ai-pilled-economists
2•1vuio0pswjnm7•45m ago•0 comments

Steel and chemicals giants demand freeze to EU's flagship climate policy

https://www.politico.eu/article/steel-and-chemicals-giants-demand-freeze-to-eus-flagship-climate-...
1•leonidasrup•46m ago•0 comments

Crypto Clarity AI

https://cryptoclarityai.com/
1•CryptoClarityAI•52m ago•0 comments

Catalog of Cycling Workouts to browse/download/share

https://cyclingintervals.com/
1•purec•59m ago•1 comments

Survey of the moniliths by fable 5 – short film in HTML

https://sand-morph.up.railway.app/survey-of-monoliths
1•echohive42•1h ago•0 comments

Quantum Entanglement for Dummies

https://zenodo.org/records/20128508
2•phdlalala•1h ago•0 comments

John Carmack on Fabrice Bellard

https://twitter.com/ID_AA_Carmack/status/2064095424420487226
4•apitman•1h ago•0 comments

Russian Spam and Profanities Are Now Plaguing the Arch Linux AUR

https://www.phoronix.com/news/Arch-Linux-AUR-Russian-Spam
2•Lockal•1h ago•0 comments

Facebooks App description is "hacked" in Play Store [video]

https://www.youtube.com/shorts/UWaIinB84q4
1•tbqq•1h ago•0 comments

Inside FIFA's World Cup Technology [video]

https://www.youtube.com/watch?v=JRhwXYfrlss
1•ofrzeta•1h ago•1 comments

Anthropic Pauses Its Claude Agent SDK Billing Change

https://origami.sa/en/blog/anthropic-pauses-agent-sdk-subscription-billing-change/
1•dockerd•1h ago•0 comments

Smarter Models, Dumber Security

https://manveerc.substack.com/p/mcp-supply-chain-attack-vector
1•manveerc•1h ago•0 comments

Ask HN: What Jobs (Roles) are in the best position to take advantage of AI?

2•CWhiting•1h ago•0 comments

Stanford CS153 Frontier Systems – Scale, AGI, and the Future of Everything [video]

https://www.youtube.com/watch?v=F_7M4Hc-usM
2•twalichiewicz•1h ago•0 comments

You've Been Murdoched: Australia's Teen Ban Offers a Warning for Europe

https://www.techpolicy.press/youve-been-murdoched-australias-teen-ban-offers-a-warning-for-europe/
5•mathgenius•1h ago•0 comments