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

PlumCalc – 33 client-side calculators with a public MCP server

https://plumcalc.com/
1•zooplays•1m ago•0 comments

Show HN: Synth Patch Hero

https://swarkentin.github.io/synth-patch-hero/
1•kaidon•1m ago•0 comments

Cross Streets: Streets that intersect to form compound words

https://crossings.azlen.me/
1•jxmorris12•2m ago•0 comments

Mcpseal: Grade an MCP server for safety before you install it

https://www.npmjs.com/package/@hashshabbir/mcp-pack
1•husham•6m ago•0 comments

Epistemic Opacity

https://twitter.com/theSamPadilla/status/2124562721173877093
1•gmays•8m ago•0 comments

Held together by spare time: Reviving wiki.alpinelinux.org during PHP2Shell

https://lambdacreate.com/posts/held-together-by-spare-time
1•renehsz•8m ago•0 comments

Show HN: Juncts, one DM inbox for five apps that Claude and ChatGPT can work in

https://juncts.com/app?demo=1&utm_source=hackernews&utm_medium=launch&utm_campaign=launch-nov26
1•jlaufr•9m ago•0 comments

Zero data retention with Enterprise Frontier Safeguards is now in beta

https://claude.com/resources/articles/zero-data-retention-with-enterprise-frontier-safeguards
1•lumpa•10m ago•0 comments

The enterprise guide to securing coding agents

https://claude.com/resources/articles/enterprise-guide-to-securing-coding-agents
1•lumpa•11m ago•0 comments

Trading System – tests trading rules against no-information baselines

https://ultimate-trading-system.com/
1•tbuitendyk•25m ago•0 comments

Show HN: FireVoice, free open-source voice studio on your own GPU

https://firevoice.fabwaseem.com
2•fabwaseem•27m ago•1 comments

A fast CAS with a focus on resolution of singularities

https://github.com/pportilla/atlas
3•furstenheim•28m ago•1 comments

Trump made up to $15M on Nvidia shares after Huang's return

https://www.ft.com/content/67b0a070-c2a9-4229-885a-383cca657763
5•JumpCrisscross•29m ago•2 comments

Hacking radiators for fun and no profit

https://qsantos.fr/2026/11/20/hacking-radiators-for-fun-and-no-profit/
1•andai•29m ago•0 comments

r/RedditEngin: We Let AI Approve PRs at Reddit. Here's What Happened

https://www.reddit.com/r/RedditEng/comments/1y3wbkw/we_let_ai_approve_prs_at_reddit_heres_what/
2•greazy•29m ago•0 comments

Show HN: Graticule, turn oscilloscope screenshots into CSV data and plots

https://github.com/SunSinD/Graticule
1•SunSinD•30m ago•0 comments

Show HN: A narrated map tour of the events leading up to the Texas Revolution

https://whistlestop.guide/features/texas-revolution
2•cognitivefilms•30m ago•1 comments

Phytochemical and genetic analyses of ancient cannabis from Central Asia (2008) [pdf]

https://jxb.oxfordjournals.org/content/59/15/4171.short
1•thunderbong•35m ago•0 comments

Apple Releases New AI Health App

https://www.macrumors.com/2026/11/16/apple-just-released-a-new-app/
1•bookofjoe•37m ago•0 comments

The Brother-Sister Duo Who Want to Keep Anthropic Weird

https://www.wsj.com/tech/ai/anthropic-dario-daniela-amodei-siblings-ipo-be84ad11
2•gmays•39m ago•0 comments

Making a dumb TV just smart enough

https://qsantos.fr/2026/11/19/making-a-dumb-tv-just-smart-enough/
1•andai•39m ago•0 comments

App Store Connect

https://appstoreconnect.apple.com/login?targetUrl=%2Fapps%2F6830303033%2Fanalytics%2Foverview%3Fd...
1•bustapheliac•39m ago•0 comments

US adds Megaspeed to trade blacklist

https://www.theguardian.com/us-news/2026/nov/23/megaspeed-us-trade-blacklist-nvidia
1•mgh2•43m ago•2 comments

Show HN: I stole a math joke from Xkcd and made art with it

https://joshhoegen.com/pages/meandian/
1•byutifu•46m ago•0 comments

A Deterministic Linear Time Algorithm for Minimum Spanning Tree

https://eccc.weizmann.ac.il/report/2026/339/
1•huvarda•47m ago•0 comments

Declare is a UI language for you and your AI

https://davidtemkin.github.io/declarelang/
1•ilamont•49m ago•0 comments

Homeostatic Awakening: A Possible Solution to the Fermi Paradox? (2022)

https://studio.m-anage.com/agu/abscicon21/meetingapp.cgi/Paper/1028592
1•rendx•50m ago•0 comments

Curt Trig (2020)

http://jeanmariechauvet.com/papers/curttrig.html
1•arthur2e5•53m ago•0 comments

Coworker rejects PR (one month in) because it does not meet his standards

3•LandOfMightDev•54m ago•4 comments

Rune: Rust VM for Emacs

https://github.com/CeleritasCelery/rune
2•whacked_new•55m ago•0 comments