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

Does It Matter If Men Pee Sitting or Standing? A Randomized Test Has an Answer

https://www.sciencealert.com/does-it-matter-if-men-pee-sitting-or-standing-a-randomized-test-has-...
1•TMWNN•2m ago•0 comments

API Craft Pro – Chrome SidePanel API Mocker and TypeScript/Zod Generator

https://chromewebstore.google.com/detail/api-craft-pro-—-instant-a/amdohgdofjccadgobnalnmaphall...
1•MockShiftStudio•6m ago•0 comments

Finance team's ChatGPT habit is a cross-border data transfer

https://e27.co/your-finance-teams-chatgpt-habit-is-a-cross-border-data-transfer-20261106/
1•powerhouseconsu•6m ago•0 comments

Show HN: OpenPocket – iOS app for running Qwen3.5, LFM and other LLMs offline

https://apps.apple.com/th/app/openpocket/id6833028114
1•ycdmf•13m ago•1 comments

Show HN: AntFabric (One Subscription for all your operational needs)

https://www.antfabric.ai/
2•vanessa1211•17m ago•0 comments

Humble Bundle just killed most of their security through vibecoding

https://forums.spacebattles.com/threads/humble-bundle-just-completely-killed-most-of-their-securi...
3•rdmuser•19m ago•0 comments

A Mad Max-style desert run built from nothing but (procedural) code

https://webgpu.com/showcase/maad-maxxing-procedural-webgpu-threejs/
1•FarhadG•19m ago•0 comments

GrapheneOS Pixel 11 support is delayed indefinitely

https://twitter.com/GrapheneOS/status/2120727750235574616
1•iloveyoutwo•20m ago•0 comments

Do open source companies pay competitively in India?

https://oss-pays.shetty.me/
1•deveesh_shetty•21m ago•0 comments

I made a CLI focus music player with lo-fi, Pomodoro timer, and Spotify support

https://github.com/WittmannF/lofi-pomodoro
1•wittmannf•23m ago•0 comments

Worse Together: How Performance Breaks Down in Multi-User Multi-Agent Teams

https://alignment.anthropic.com/2026/worse-together/
2•matt_d•23m ago•0 comments

World heading for 'irrevocable overshoot' of global temperature thresholds

https://www.theguardian.com/environment/2026/nov/12/world-heading-for-irrevocable-overshoot-of-gl...
1•vrganj•24m ago•0 comments

Show HN: Excel Inserter - Insert notes and screenshots into Microsoft Excel

https://algolassi.online/products/excel-inserter/
1•noobplus•27m ago•0 comments

LeapQuant: Efficient Linear Attention with Accurate Recurrent State Quantization

https://leapquant.github.io/
1•matt_d•28m ago•0 comments

Ask HN: Are clean Git commits still worth it?

1•joooscha•29m ago•1 comments

Europe has been living beyond its means. Now the bills are due

https://economist.com/europe/2026/11/10/europe-has-been-living-beyond-its-means-now-the-bills-are...
2•andsoitis•30m ago•0 comments

258 Nvidia headlines: 6% ethics-negative before the scandal, 82% after

https://github.com/twobitapps/nvidia-headlines-ethics-2026
1•iLuddite•32m ago•1 comments

Apple is shuttering its 28-year-old online community forum

https://arstechnica.com/gadgets/2026/11/apple-is-shuttering-its-28-year-old-online-community-forum/
3•apparent•33m ago•1 comments

Shooting Bias

https://en.wikipedia.org/wiki/Shooting_bias
1•chistev•41m ago•0 comments

Show HN: JNum – Pure Java 25 NumPy/BLAS via Project Panama FFM and Vector API

https://github.com/CH-Abhinav/JNum
2•CH-Abhinav•43m ago•0 comments

WSP MCP – Free MCP Plugin for WordPress

https://github.com/bilalnaseer/wsp-wordpress-mcp
1•wspmcp67•44m ago•0 comments

Show HN: Gohawk – A Resource Leak and Concurrency Static Analyzer for Go

https://gohawk.dev/
1•its-malbolge-ti•45m ago•1 comments

AI is getting smarter. Are we thinking better?

https://www.daybranch.com/
1•brunohenriquede•46m ago•0 comments

Show HN: Minimal and self-hosted website monitoring

https://github.com/tanin47/jping
1•tanin•47m ago•0 comments

Where to Buy a Custom Fake ID with Your Own Details

https://www.yoloids.com/where-to-buy-a-custom-fake-id-with-your-own-details/
1•malinograham•48m ago•0 comments

Ask HN: Is GitHub Downloads Down?

1•t0duf0du•48m ago•0 comments

Algorithm in the Consulting Room

https://medium.com/@smoking2man/algorithm-in-the-consulting-room-on-the-architectural-mismatch-be...
1•Aldus551•48m ago•0 comments

What benefit does a San Francisco HQ offer if you are not a frontier AI lab?

1•jpqwerty•50m ago•6 comments

Redis Got Ported to Rust

https://github.com/kividbio/kividb/blob/master/README.md
1•robindooh•52m ago•0 comments

Show HN: Qwen Reasoning Traces Trainer and Inference Server

https://github.com/cookiengineer/qwen-reasoning-trainer
1•cookiengineer•52m ago•0 comments