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

Sobek: Streaming Equivariant Tensor Product Convolutions

https://arxiv.org/abs/2607.18074
1•sbulaev•1m ago•0 comments

Taking OCaml and Eio for a Spin

https://mattjhall.co.uk/posts/taking-ocaml-eio-for-a-spin.html
1•ingve•1m ago•0 comments

Show HN: Core Kanji, an SRS with no self-grading that picks what to study next

https://moxzas.github.io/core-kanji/
1•moxza•2m ago•0 comments

Perplexity Pro limits: the shrinking $20 plan, in 1,024 posts

https://okaneland.com/study/perplexity-pro-limits/
1•ermantrout•2m ago•0 comments

Tpo-Torch – Target Policy Optimization for Stable RLHF Alignment in PyTorch

https://github.com/Griffith-7/Tpo-torch
1•Griffith-7•4m ago•1 comments

Advancing next-gen AI with materials science innovation

https://www.technologyreview.com/2026/07/21/1140602/advancing-next-gen-ai-with-materials-science-...
1•joozio•6m ago•0 comments

Show HN: Darkdrive now open source (AGPLv3)

https://darkdrive.de/en/
1•plue-tech•7m ago•0 comments

Cha-Solver – Chess helpmate solver

https://chasolver.org/
1•Mr_Minderbinder•8m ago•0 comments

GitHub release downloads. 1 sale. What's a real ratio?

https://github.com/boraoztunc/bookmarker-releases/releases
1•kaizenb•11m ago•0 comments

Sonobe

https://en.wikipedia.org/wiki/Sonobe
1•vismit2000•11m ago•0 comments

Speedread Lets You Rapidly Assimilate Text Documents on Linux

https://www.makeuseof.com/speedread-linux-rapidly-assimilate-text-documents/
1•ankitg12•13m ago•0 comments

Leaking internal headers in Flask Ninja with deserialization

https://eval.blog/research/pickle-gadget-chain-in-flask-ninja/
1•0xcrypto•17m ago•0 comments

Best Foldable Phones

https://www.nytimes.com/wirecutter/reviews/best-foldable-phones/
1•vanclaude•18m ago•0 comments

Boeing asks US to intervene over record EU loan to Airbus

https://www.reuters.com/business/aerospace-defense/boeing-asks-us-intervene-over-record-eu-loan-a...
1•elDutie•19m ago•0 comments

Show HN: See each Law of UX broken, then fixed, in a live demo

https://laws-of-ux-examples.pagepost.app/
1•atzoumas•19m ago•1 comments

Chelsea's Defensive Rebuild Gains Momentum as Lacroix Emerges as Priority Target

https://predx-article.fika.bar/chelsea-s-defensive-rebuild-gains-momentum-as-maxence-lacroi-01KY1...
1•joeymabia1•19m ago•0 comments

Flavor Lines

https://vova.today/en/works/plofornot/
1•altilunium•19m ago•0 comments

An open dataset for modeling consciousness and sedation from EEG under propofol

https://zenodo.org/records/18483292
2•katsee•19m ago•0 comments

GitHub Incident with Deploy Keys

https://www.githubstatus.com/incidents/g40zcbvchny4
3•gowthamgts12•20m ago•0 comments

LibreFolio – Self-hosted portfolio tracker with 11 broker imports

https://github.com/Librefolio/LibreFolio
1•librefolio•21m ago•0 comments

I moved Agentique's LLM layer to BAML

https://agentique.ch/blog/why-i-moved-agentiques-llm-layer-to-baml/
1•dimslaev•21m ago•0 comments

Streaming, Fast and Slow: Cognitive Load-Aware Streaming

https://arxiv.org/abs/2504.17999
1•ankitg12•21m ago•0 comments

SubNuke – A privacy-first subscription tracker that doesn't require bank access

https://www.getsubnuke.com
1•zardt_•21m ago•0 comments

iOS 27 jailbreak with usbliter8 exploit

https://github.com/34306/usbliter8-fun
1•quyleanh•22m ago•0 comments

GPT-5.6 vs. Claude Fable 5 for Physical AI, which performs best?

https://juliahub.com/blog/frontier-models-physical-ai-evaluation
1•ChrisRackauckas•25m ago•0 comments

Chamath Palihapitiya on X: "Tricking US Gov protect frontier labs is a mistake

https://twitter.com/chamath/status/2079457219892871458
1•bilsbie•27m ago•0 comments

The Fake Influencers Selling Wellness on Your Feed

https://www.nytimes.com/video/technology/100000011001849/ai-influencers-health-supplements-fake-a...
1•pretext•28m ago•0 comments

The Rise of Fashion Slop

https://www.nytimes.com/2026/07/21/opinion/fashion-slop-boring.html
1•pretext•30m ago•0 comments

Show HN: Friday – a local-first desktop AI assistant that can use tools

https://friday.haraldbregu.com/
1•haraldbregu•34m ago•0 comments

RLHF and Post-Training Course by Nathan Lambert

https://rlhfbook.com/course
1•ankitg12•35m ago•0 comments