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

War Bros Didn't Always Rule Silicon Valley

https://www.wired.com/story/war-bros-didnt-always-rule-silicon-valley/
1•sgustard•2m ago•0 comments

Decentralized P2P app with you in the center of a WebTorrent Venn Diagram

https://bubblebased.com/bubbles/global
1•bc3mc2•7m ago•1 comments

Ukraine's new military AI does more than watch the battlefield–it helps commande

https://euromaidanpress.com/2026/09/25/ukraines-new-military-ai-does-more-than-watch-the-battlefi...
1•snarky-comments•7m ago•0 comments

Open-source AnyPS5 dumps emulation to run PS5 games natively on PC

https://www.tomshardware.com/video-games/playstation/open-source-anyps5-dumps-emulation-to-run-pl...
2•sbulaev•13m ago•0 comments

SevenDB: Reactive yet Scalable

https://github.com/sevenDatabase/SevenDB
1•shashanksati11•14m ago•0 comments

World United Blastoff

1•James_Random_Ha•16m ago•0 comments

Stop Asking "Saga or 2PC." Start Asking What Each Operation Needs

https://medium.com/scalar-engineering/stop-asking-saga-or-2pc-start-asking-what-each-operation-ne...
1•feeblefakie•30m ago•0 comments

Australia's Waratah Super Battery Now Operating at Full Capacity

https://www.bloomberg.com/news/articles/2026-09-28/waratah-super-battery-australia-s-most-powerfu...
1•toomuchtodo•39m ago•1 comments

How the stories about all-powerful AI are swallowing the world

https://www.bloodinthemachine.com/p/how-the-stories-about-all-powerful
1•eustoria•41m ago•0 comments

Comics RSS: RSS feeds of comics

https://www.comicsrss.com/
2•eustoria•43m ago•0 comments

Ask HN: Do you think AI agents can escape human control?

2•automaticallyfl•44m ago•1 comments

OpenAI pauses training of latest models

https://www.nbcnews.com/tech/tech-news/openai-pauses-training-latest-models-agents-searched-us-go...
1•geoffbp•47m ago•1 comments

What a black bear is: 30 claims, checked against primary sources

https://pub-a941bfd863a24f91a60e6c4979c18a84.r2.dev/pi-sandbox-uploads/343507889626812416/2026-09...
1•oricvandson•51m ago•0 comments

What Happened to the Coronagraph?

https://blogs.esa.int/proba-3/2026/03/19/what-happened-to-the-coronagraph/
1•bryanrasmussen•52m ago•0 comments

Australia Senate Requests OpenAI, Anthropic CEOs Face AI Inquiry

https://www.bloomberg.com/news/articles/2026-09-27/australia-senate-requests-openai-anthropic-ceo...
3•oxag3n•53m ago•0 comments

Thinking Fast and Slow in AI: The Role of Metacognition

https://arxiv.org/abs/2110.01834
13•teleforce•56m ago•0 comments

99.26% storage reduction with exact reconstruction on 100-version repo

https://github.com/openzfs/zfs/discussions/19201
2•bamboozledlabs•1h ago•0 comments

Agdog – htop and nvitop, fused and agent-aware

https://github.com/dynaum/agdog
1•dynaum•1h ago•0 comments

RFPeptides: De novo design of protein-binding macrocycles using deep learning

https://www.nature.com/articles/s41589-025-01929-w
1•brandonb•1h ago•0 comments

Who is responsible for limiting global warming to 1.5 degrees?

https://www.universiteitleiden.nl/en/news/2026/09/phd-stephanie-cap
1•geox•1h ago•0 comments

What 'ferritin face' means – and how to tell if you may be iron-deficient

https://www.washingtonpost.com/wellness/2026/09/15/what-ferritin-face-means-how-tell-if-you-may-b...
1•brandonb•1h ago•0 comments

YouTube has a Propaganda Problem [video]

https://www.youtube.com/watch?v=H8YdOF1yXfM
7•justhw•1h ago•0 comments

The #2 x402 seller on Base funded its own buyers

https://chainward.ai/decodes/x402-on-base
1•saltxd•1h ago•0 comments

Night of Ten Thousand Lanterns – interactive dynamic painting

https://www.echohive.ai/experiments/lanterns
2•echohive42•1h ago•2 comments

Armada: Encrypted, Open-Source, Discord Alternative (Built on Nostr)

https://soapbox.pub/armada
20•long____cat•1h ago•0 comments

An open protocol for agent feedback

https://feedback.now/
1•iacguy•1h ago•0 comments

Debian 11 bullseye-security repos have gone missing after botched EOL process

https://lists.debian.org/debian-mirrors/2026/09/msg00001.html
6•superkuh•1h ago•2 comments

Roundup of October 2026 Bootstrapper Events

https://bootstrappersbreakfast.com/2026/09/22/roundup-of-october-2026-bootstrapper-events/
1•skmurphy•1h ago•1 comments

Microsoft drops Copilot+ branding from its new laptops

https://www.tomshardware.com/tablets/microsoft-surface/microsoft-quietly-drops-copilot-branding-f...
22•anthuswilliams•1h ago•6 comments

Build a Real‑Time Telemetry Pipeline for SpaceX Starship Launches

https://thelooplet.com/posts/how-to-build-a-real-time-telemetry-pipeline-for-spacex-starship-laun...
3•killme2008•1h ago•0 comments