frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•8mo 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•8mo 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•8mo 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).

Poolsuite CLI – Ultra-summer internet radio from your terminal

https://github.com/jamespember/poolsuite-cli
1•jep888•3m ago•1 comments

WordWalker Spanish

https://wordwalker.ca/
1•petedrinnan•3m ago•0 comments

Show HN: A 6.9B Moe LLM in Rust, Go, and Python

https://github.com/fumi-engineer/machine_learning
2•fumi2026•8m ago•1 comments

The Stirling Engine: A Wave of the Future Ago [video]

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

Show HN: AI Tryon Product to Video Generator

https://aitryon.art/ai-product-to-video/
1•AITryon•12m ago•0 comments

Watch Cursor build a 3M+ line browser in a week

https://twitter.com/mntruell/status/2012825801381580880
2•hentrep•15m ago•0 comments

The Convolutional Neural Network

https://cocakoala.substack.com/p/the-convolutional-neural-network
1•imranmk•17m ago•0 comments

Writing Your First Compiler

https://popovicu.com/posts/writing-your-first-compiler/
2•thunderbong•20m ago•0 comments

Meta has discontinued its metaverse for work, too

https://www.theverge.com/tech/863209/meta-has-discontinued-its-metaverse-for-work-too
2•prawn•24m ago•0 comments

The Computational Web and the Old AI Switcharoo

https://www.fromjason.xyz/p/notebook/the-computational-web-and-the-old-ai-switcharoo/
1•jayveeone•29m ago•0 comments

Greenland Crisis

https://en.wikipedia.org/wiki/Greenland_crisis
2•handfuloflight•31m ago•0 comments

MH370 operational search reports

https://www.atsb.gov.au/mh370-pages/updates/reports
2•teleforce•36m ago•0 comments

Nushell 0.110.0

https://www.nushell.sh/blog/2026-01-17-nushell_v0_110_0.html
1•Fervicus•40m ago•0 comments

The AI revolution is here. Will the economy survive the transition?

https://post.substack.com/p/the-ai-revolution-is-here-will-the
3•mooreds•48m ago•0 comments

Show HN: 2FA2FA – 2FA Live Auth (Real-Time TOTP Authentication)

https://2fa2fa.com
1•SongDeYu•49m ago•1 comments

Show HN: Ops-Tools – a Rust-Based DevOps CLI Swiss Army Knife

https://github.com/DennySORA/Ops-Tools
1•dennysora•49m ago•0 comments

A fast Rust port of Steve Yegge's beads

https://github.com/Dicklesworthstone/beads_rust
1•sorenbs•53m ago•0 comments

CD Projekt issue DMCA takedown notice against popular Cyberpunk VR mod

https://www.patreon.com/posts/another-one-dust-148437771
6•wjdp•55m ago•0 comments

Air traffic control: the IBM 9020

https://computer.rip/2026-01-17-air-traffic-control-9020.html
2•pinewurst•59m ago•0 comments

Show HN: Anti-Detect.com – Browser Fingerprint Scanner

https://anti-detect.com/
1•SongDeYu•1h ago•0 comments

In Defense of Data Centers

https://www.deeplearning.ai/the-batch/issue-336/
1•nl•1h ago•1 comments

Why the Best AI Systems Are Still So Bad at Pokémon

https://time.com/7345903/ai-chatgpt-claude-gemini-pokemon/
1•26d0•1h ago•0 comments

Ask HN: How to find a sponsor?

1•TySchultz•1h ago•0 comments

San Francisco coyote swims to Alcatraz

https://www.sfgate.com/local/article/san-francisco-coyote-alcatraz-21302218.php
4•kaycebasques•1h ago•0 comments

People cannot "just pay attention" to (boring, routine) things

https://utcc.utoronto.ca/~cks/space/blog/tech/PeopleCannotPayAttention
3•todsacerdoti•1h ago•0 comments

All your OpenCodes belong to us

https://johncodes.com/archive/2026/01-18-all-your-opencodes/
3•jpmcb•1h ago•0 comments

The Code-Only Agent

https://rijnard.com/blog/the-code-only-agent
9•emersonmacro•1h ago•1 comments

Bring Back Ops Pride

https://charitydotwtf.substack.com/p/bring-back-ops-pride
3•mooreds•1h ago•2 comments

Show HN: Knowhere – Rust-Based SQL Engine with TUI and GUI (Built on DataFusion)

https://saivarunk.github.io/knowhere/
1•waxsum8•1h ago•0 comments

With this tool, you can enjoy NAS functionality even without a NAS

https://quicksend.chat/
1•foodhome•1h ago•0 comments