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

The White House Is Ratcheting Up Its War Against Anthropic

https://www.theatlantic.com/technology/2026/06/trump-anthropic-export-control-ai-race/687555/
1•Filligree•7s ago•0 comments

Ask HN: Does anyone have their PMs shipping code to customer-facing products?

2•reluctant_dev•5m ago•0 comments

Earn lending-market yield on internet dollars

https://www.askthehive.ai/
1•prismoonprismo•9m ago•0 comments

Ratchets: a Rust tool that polices style violations with a flexible budget

https://github.com/imbue-ai/ratchets
1•nvader•10m ago•0 comments

Ai2 ACE2S – Simulate atmospheric variability – Scale of days to centuries

https://huggingface.co/allenai/ACE2S-SHiELD-plus
1•embedding-shape•15m ago•0 comments

Free Full on App Opensource. This One Is an Absolute Gem Find on GitHub

https://github.com/Prithvi-Web/Treemap
1•DaGoat487•15m ago•4 comments

Amazon Announces Multibillion-Dollar Data Center in Missouri

https://www.narracomm.com/amazon-announces-multibillion-dollar-data-center-in-missouri/
2•thelonelyborg•17m ago•1 comments

How the PH1 barrel became a legend in America's craft beer scene

https://www.washingtonpost.com/food/2026/06/15/how-ph1-barrel-became-legend-america-craft-beer-sc...
1•bookofjoe•20m ago•2 comments

The US just treated an LLM as a munition

https://substack.productmind.co/p/four-thoughts-on-anthropics-fable
2•okosisi•23m ago•1 comments

DeepFork – reverse-engineer any OSS repo into a clean-room rebuild blueprint

https://github.com/GerardoRdz96/deepfork
2•gerardordz96•28m ago•1 comments

Reviews have become expensive, rewrites have become cheap

http://ishmeetbindra.com/posts/reviews-have-become-expensive-rewrites-have-become-cheap/
2•arzh2•32m ago•0 comments

Explosions in Iran IRGC Infighting over "Deal", Hezbollah Attacks Israel [video]

https://www.youtube.com/watch?v=ZehgwIxh4eA
2•Bender•33m ago•0 comments

The Org Harness

https://pub.towardsai.net/the-org-harness-edef5844ba10?source=friends_link&sk=c7ddedd34684476842b...
1•tacoda•37m ago•0 comments

Xiaomi's agentic AI coding harness MiMo Code beats Claude Code at 200 step tasks

https://venturebeat.com/technology/xiaomis-new-open-source-agentic-ai-coding-harness-mimo-code-be...
3•gmays•39m ago•0 comments

Show HN: An Information Exchange for Agents

https://callsign.sh/
1•ric2z•40m ago•4 comments

FreeBSD 15.1-Release Now Available

https://lists.freebsd.org/archives/freebsd-announce/2026-June/000274.html
1•cperciva•41m ago•0 comments

Startup supposed to revolutionize California's wine industry 'It failed'

https://www.latimes.com/business/story/2026-06-15/this-startup-was-supposed-to-revolutionize-cali...
4•iancmceachern•45m ago•0 comments

The Exe.dev iOS App

https://blog.exe.dev/ios
1•bryanmikaelian•47m ago•0 comments

As a potential bug bounty hunter need an advice from bounty hunting veterans

1•SunShineDust•47m ago•0 comments

Eight Crew Members Believed Dead in B-52 Bomber Crash at California Air Base

https://www.wsj.com/us-news/b-52-bomber-crashes-shortly-after-take-off-at-california-air-base-253...
1•fortran77•48m ago•2 comments

UK social media ban for children: the privacy problems Australia exposed

https://proton.me/blog/uk-social-media-ban-privacy
3•jethronethro•49m ago•0 comments

Continue has been acquired by Cursor

https://www.continue.dev
2•platevoltage•50m ago•3 comments

Ultracoding: The Next Frontier

https://www.jay.ai/blog/ultracoding-the-next-frontier
2•_jayhack_•52m ago•0 comments

The Productivity J-Curve [pdf]

https://ide.mit.edu/sites/default/files/publications/jcurve.pdf
1•kioku•57m ago•0 comments

Www.ander.com

https://blog.cloudflare.com/es-es/welcome-to-connectivity-cloud/
1•the-art•58m ago•0 comments

Stolen fries are spicier than justice: How covert larceny enhances taste

https://www.sciencedirect.com/science/article/abs/pii/S0950329326001126
3•gnabgib•1h ago•0 comments

Beyond Transcription: ASR Model Delivers Words, Emotion, and Intent in 200ms

https://whissle.ai/blogs/multilingual-asr-benchmark-ngram-language-models
1•ksingla025•1h ago•0 comments

Egyptian Fractions

https://blog.plover.com/math/egyptian-fractions.html
3•luu•1h ago•0 comments

Show HN: HashMeterAi – Private AI Token Real Usage Meter for All Models

https://github.com/Hash-7777/HashMeterAi
2•Hash7777•1h ago•1 comments

Beneath the Enshittification, Something Is Growing

https://www.techdirt.com/2026/06/10/beneath-the-enshittification-something-amazing-is-growing/
4•doener•1h ago•0 comments