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

Spy court: U.K. must admit it ordered an Apple backdoor

https://www.heise.de/en/news/Spy-court-U-K-must-admit-it-ordered-an-Apple-backdoor-11531852.html
1•slow_typist•3m ago•0 comments

AR

1•Anshraiofficial•4m ago•1 comments

November 2026 Top500 New Systems Are Few and Far Between – ServeTheHome

https://www.servethehome.com/november-2026-top500-new-systems-analysis/
1•rbanffy•4m ago•0 comments

Thoughts from Before and After AI

https://chevyclutchfoot.substack.com/p/thought-process-before-and-after
1•noduerme•6m ago•0 comments

The Myth of the "One Shot"

https://blog.vandesande.design/every-one-shot-is-slop
1•mrcgnc•7m ago•0 comments

Codeberg.org domain unavailable – investigation and post-mortem

https://codeberg.org/Codeberg/changelog/issues/7#issuecomment-28100157
2•BrunoBernardino•7m ago•0 comments

Greece's PM Mitsotakis and Greek AI Founders [video]

https://www.youtube.com/watch?v=Gis_2Y_pLOo
1•greekanalyst•8m ago•0 comments

Google Officially Rolls Out Collapsible Sidebar on Search

https://www.seroundtable.com/google-search-rolls-out-ai-mode-sidebar-42580.html
1•thm•8m ago•0 comments

AI Is Making China's Jobs Slump Worse

https://www.bloomberg.com/graphics/2026-china-ai-jobs-slump/
2•thm•8m ago•0 comments

Token fraud is here and it's BAD [video]

https://www.youtube.com/watch?v=ZDpP7JXPlhc
1•vismit2000•8m ago•0 comments

Google Disrupts Its Search Advertising with Its Embrace of A.I

https://www.nytimes.com/2026/11/19/technology/google-search-ads-ai.html
2•thm•8m ago•0 comments

Cool Flex AI Bro

https://interconnected.org/home/2026/11/20/flex
2•Tomte•13m ago•0 comments

Google DeepMind AI predicts Hurricane Melissa path and strength

https://hyper.ai/cn/stories/cd12451364b2d99638b382e350c3d12a
1•HyperAI•15m ago•0 comments

Tapelark's first month: 54 customers and a little over €2,100

https://victorantos.com/posts/tapelark-first-month/
1•victorbuilds•18m ago•0 comments

The Content–Geometry Tradeoff in World Models: When JEPA Learns Latent Maps [pdf]

https://cdn.agenticlearning.ai/25c41dcbc4b7a11e/content-geometry-tradeoff-2026.pdf
1•brandonb•18m ago•0 comments

Show HN: NetLoom, a live view into the Nano block lattice

https://viz.openrai.org/netloom.html
1•cbrunnkvist•19m ago•0 comments

Our S3 cache is full of holes – We put them there

https://www.bzrk.dev/blog/sparse-files/
5•borlum•21m ago•1 comments

Frostbite: A new CPU architecture discovered, designed and verified by AI

https://architectlabs.com/blog/frostbite
4•shioyama•22m ago•1 comments

Show HN: NostrPulse – Bitcoin HTTP 402 (L402 and Cashu) MCP Server for AI Agents

https://github.com/PHONGUIT22/nostrpulse-full
2•hacphong•22m ago•0 comments

Windows Server 2028 trades compatibility for out-of-the-box security

https://arstechnica.com/gadgets/2026/11/windows-server-2028-public-preview-bets-on-a-security-fir...
3•rbanffy•23m ago•0 comments

Made Doculigent – a loom and otter alternative

2•Baraklabs•23m ago•0 comments

RollerCoasterTycoonBench: Can Decision Models Manage a Theme Park?

https://www.vals.ai/blogs/building-rctbench
1•valkrieco•27m ago•0 comments

China blocks SoftBank's $5.4B takeover of ABB's robotics division

https://www.reuters.com/business/media-telecom/china-blocks-softbanks-54-billion-takeover-abbs-ro...
5•dingdongditchme•27m ago•0 comments

What people are building, discovered through new domains

https://startups.novumsignals.com/
3•walterschnitzel•29m ago•1 comments

UK fridges secured from hackers in secret nationwide operation

https://www.bbc.co.uk/news/articles/c6eq49zyx7p4o
12•tomnext•31m ago•2 comments

Persistent Incrementality in Rust

https://rust-glancer.github.io/blog/persistent-incrementality-in-rust/
2•joshcsimmons•32m ago•0 comments

Anatomy of an AI-driven attack: What ARTEX looks like in action

https://bitrise.io/artex-incident-report
2•gabornadai•32m ago•0 comments

I Stopped Using Conversation History as My Agents' State

https://medium.com/@ulrich.tan/building-stateful-investigations-with-stateless-ai-agents-2fc9bab3...
1•ulrichxtan•35m ago•0 comments

Anthropic IPO could yield $156B for charity

https://hyper.ai/stories/38cbde179199e5d614e6f2b5abfb0911
2•HyperAI•35m ago•0 comments

Show HN: Deflate X-Ray, See inside a compressed file

https://hrih.si/projects/deflate-xray/
1•DonAtimator•36m ago•0 comments