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

HTTPS: //Chigurh.org/ Parody

https://chigurh.org/
1•ParadisoShlee•54s ago•0 comments

Show HN: Symphony – sandboxed coding agents you manage like tickets

https://symphony.stavros.io
1•stavros•54s ago•0 comments

Rollikey – Deterministic rollback and 60s airlock for AI agents (MCP)

https://github.com/rollikey/rollikey
1•joshuadorrick•1m ago•0 comments

Swarm Scaling

https://www.tobyord.com/writing/swarm-scaling
1•xtacy•1m ago•0 comments

Show HN: Snibl – Save highlighted text from any app, then ask AI about it

https://snibl.app/
1•amit_mirgal•2m ago•0 comments

Valve's Proton 11.0-3 Brings 15 More Games to Linux

https://www.linuxjournal.com/content/valves-proton-110-3-brings-15-more-games-linux-better-vr-con...
2•tadelstein•3m ago•0 comments

Ready Soldier One: Video Game Incentives and Law of Armed Conflict Compliance

https://lieber.westpoint.edu/ready-soldier-one-video-game-incentives-law-armed-conflict-compliance/
1•mofosyne•4m ago•1 comments

Fade – Cursor for Video Ads

https://www.tryfade.ai/
2•kadunas•4m ago•0 comments

Show HN: Newsstand – read all your newsletters on Kindle and web

https://newsstand.email
2•sourc3•5m ago•1 comments

Idempotent Event Processing with Azure Event Hubs, Part 2: Deduplication

https://blog.techdominator.com/article/idempotent-event-processing-with-azure-event-hubs-part-2-r...
2•techdominator•6m ago•1 comments

DJI Log Toolkit based on Rerun

https://github.com/lvauvillier/dji-log-toolkit
1•Tycho87•7m ago•0 comments

Show HN: gh-stats – one self-hostable SVG card for a GitHub profile README

https://gh-stats.com/
2•s_manor•8m ago•0 comments

How India's ministries divided, fused and popped, 1947–2026

https://ministry-evolution.orgpedia.in/
2•mukundesh•9m ago•0 comments

Portal 2 Source code leak

https://www.reddit.com/r/Portal/comments/1y95i9j/portal_2_source_code_leak/
1•haunter•10m ago•1 comments

The Anthropic Anti-Theorem

https://www.j2wong.com/blog/anthropic-anti-theorem
2•jacky2wong•11m ago•1 comments

Noscript November Challenge

https://dbushell.com/2026/11/30/no-javascript-november-challenge/
2•rpgbr•12m ago•0 comments

I built an LLM where Gemini 4 wrote the initial weights as code (97% of bytes)

https://weights-as-code.pages.dev/
3•umjunsik132•13m ago•0 comments

The race to secure record-like information for domains

https://alexsci.com/blog/the-race-to-secure-record-like-information-for-domains/
2•surprisetalk•13m ago•0 comments

Show HN: Gitto. A desktop Git client in Rust, with repos over SSH

https://gitto.app/
1•coorasse2•14m ago•0 comments

Astronomers Discover a Galaxy Almost Untouched by Evolution

https://www.sciencealert.com/jwst-discovers-a-strange-time-capsule-galaxy-almost-untouched-by-the...
1•Diraan•14m ago•0 comments

SlowUnfollow: Clean Instagram from data export, without giving your password

https://github.com/Moanesbbr/slow-unfollow
3•moanesbbr•15m ago•0 comments

Show HN: My free tools list for grow LinkedIn posts reach

https://linkedinlikes.com/linkedin-free-tools
2•bigmuzzy•15m ago•0 comments

AI is Now Smarter than Me

https://geohot.github.io//blog/jekyll/update/2026/11/30/ai-is-smarter-than-me.html
4•MaximilianEmel•17m ago•1 comments

Show HN: A modern reader for Hacker News

https://myhn.dev
4•someone__else•17m ago•2 comments

Show HN: 15,000 HN-recommended books, 100 AI insights per book

https://books.opendb.app/
2•xh2012•20m ago•0 comments

How Immutable Is Your Immutable Root of Trust?

https://danielmangum.com/posts/how-immutable-rot/
1•hasheddan•20m ago•0 comments

Show HN: Nylon Robotics SDK (Baremetal on Pi, Linux-Free)

https://nylon.grandtheorem.com/
2•sircodesalot•20m ago•0 comments

AI-generated political ads didn't sway voters but they're not going anywhere

https://www.npr.org/2026/11/25/nx-s1-6045833/ai-political-ads-deepfake-voters-data-campaigns
1•blinding-streak•21m ago•0 comments

Tiiny z01 deep dive, part 5: the bug hunts

https://bentlybro.com/posts/tiiny-z01-deep-dive-part-5-the-bug-hunts
1•frostbyte7•22m ago•0 comments

Chinese giants use only local tech on best open-weight model to date

https://www.theregister.com/ai-and-ml/2026/11/30/chinese-giants-use-only-local-tech-on-best-open-...
5•Bender•22m ago•1 comments