frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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

Fifty Years of Transaction Processing Research

https://arxiv.org/abs/2605.20466
1•qianli_cs•1m ago•0 comments

Vibe Coding Escapades: pelican-copy-code plugin

https://blog.fidelramos.net/software/vibe-coding-escapades-pelican-copy-code
1•tripu•1m ago•0 comments

Does a trusted AI asset marketplace solve this issue?

https://kimura.yumiwillems.com/p/why-ais-biggest-deals-price-assets
1•BehaviorGraph•1m ago•0 comments

Consumer Founders

https://2lr.substack.com/p/consumer-founders-building-the-impossible
1•jdenquin•2m ago•0 comments

R vs. Dudley and Stephens

https://en.wikipedia.org/wiki/R_v_Dudley_and_Stephens
1•benbreen•3m ago•0 comments

How we contain Claude across products

https://www.anthropic.com/engineering/how-we-contain-claude
2•siegers•4m ago•0 comments

AI chatbots show bias toward Catholicism, researchers say

https://decrypt.co/369045/ai-chatbots-claude-chatgpt-bias-catholicism-pope-leo
5•pseudosim•4m ago•0 comments

Tokens Never Die

https://artsabintsev.substack.com/p/tokens-never-die
1•Arts86•5m ago•0 comments

Laguna M.1/XS.2 Technical Report [pdf]

https://poolside.ai/assets/laguna/laguna-m1-xs2-technical-report.pdf
1•rexledesma•6m ago•0 comments

Show HN: Clipmon – Menubar Clipboard Manager for macOS

https://github.com/C9-Labs/clipmon
1•vednig•7m ago•0 comments

Top Sanity Agencies to Hire in 2026

https://gitnation.com/contents/12-top-sanity-cms-development-agencies-to-hire
1•katyadrozd•9m ago•0 comments

Google ADK now available for Kotlin

https://developers.googleblog.com/adk-kotlin-android-building-ai-agents/
1•avanwyk•10m ago•0 comments

Genshin Impact company miHoYo keeps stealing from indie games

https://bsky.app/profile/michaelkamm.games/post/3mmrfwqupos2s
2•sourencho•10m ago•0 comments

LMIM OS – an offline AI ecosystem. Voice, RAG, WhatsApp. ++ One file. 0 setup

https://lmim.tech
1•iamonthemission•11m ago•0 comments

John Carmack on Inlined Code

http://number-none.com/blow/john_carmack_on_inlined_code.html
1•tosh•11m ago•0 comments

Deploying Rust to Production Checklist

https://kerkour.com/rust-production-checklist
1•aniviacat•11m ago•0 comments

NPR maintains the most complete database and visual archive of J6 prosecutions

https://apps.npr.org/jan-6-archive/
5•rolph•12m ago•0 comments

Chemistry behind the Garden Grove chemical tank

https://www.science.org/content/blog-post/methyl-methacrylate-tank
4•nooks•12m ago•0 comments

The Melancholy of Slaying Monsters

https://thereader.mitpress.mit.edu/the-strange-melancholy-of-slaying-monsters/
2•prismatic•12m ago•0 comments

Your Stack Overflow Graphs Prove Nothing

https://techstackups.com/articles/stackoverflow-graphs-prove-nothing/
1•sixhobbits•13m ago•0 comments

Show HN: CredWork – a simple project tracking and showcasing tool

https://www.credwork.co/
1•tusharcw•14m ago•0 comments

Visibility into the Black Box

https://matgreten.dev/posts/visibility-into-the-black-box/
1•nickstinemates•14m ago•0 comments

False Positive OSV Advisories Reported by Amazon Inspector

https://github.com/ossf/malicious-packages/pull/1276/files
1•joeyhage•14m ago•1 comments

Software After Software

https://twitter.com/thorstenball/status/2059304318055150066
1•tosh•15m ago•0 comments

Ask HN: How do LLMs work really?

2•thrw045•16m ago•0 comments

Standard relu should have been defined as passing the value at zero

https://twitter.com/ID_AA_Carmack/status/2059347005621645404
2•tosh•16m ago•0 comments

Trump's 25% cut on Nvidia chips to China backfired as Beijing blocks H200 sales

https://finance.yahoo.com/markets/stocks/articles/trumps-25-cut-nvidia-chips-194500691.html
9•frasermarlow•17m ago•0 comments

Overview and Comments on Pope Leo's Magnifica Humanitas on AI

https://www.lesswrong.com/posts/RZeg98Tdrq47vbjva/rtmh-pope-leo-s-magnifica-humanitas-on-ai
1•mnicky•18m ago•1 comments

Show HN: Clark-agent, a Rust library for LLM tool loops

https://github.com/clark-labs-inc/clark-agent
1•stan_kirdey•18m ago•0 comments

Barthelme, the Houstonian

https://www.theparisreview.org/blog/2026/05/22/barthelme-the-houstonian/
1•Caiero•18m ago•0 comments