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

AI took my job as a translator. I'm starting over at 39 [video]

https://www.youtube.com/watch?v=OovTIngZtCY
1•mmarian•59s ago•0 comments

Ossature can now catch code that compiles but is wrong

https://ossature.dev/blog/code-compiles-but-is-wrong/
1•beshrkayali•1m ago•0 comments

Show HN: Skill Studio – mine, edit, and manage Agent Skills

https://github.com/AltrinaAI/skill-studio
1•harveyhu•2m ago•0 comments

Spotlight on the Shingles Vaccine–Again

https://erictopol.substack.com/p/spotlight-on-the-shingles-vaccineagain
1•paulpauper•3m ago•0 comments

A Maybe Type for C++

https://lzon.ca/posts/tips/cpp-maybe-type/
1•jpmitchell•3m ago•0 comments

The Moonshot

https://writing.antonleicht.me/p/the-moonshot
1•paulpauper•4m ago•0 comments

Dave Baszucki on Roblox, Teen Entrepreneurs, and the Future of Play (Ep. 280)

https://conversationswithtyler.com/episodes/dave-baszucki/
1•paulpauper•4m ago•0 comments

Robust External Hash Aggregation in the Solid State Age (2024)

https://duckdb.org/library/robust-external-hash-aggregation/
1•tosh•5m ago•0 comments

Tons of Loctite adhesive used in Sagrada Familia's central towers

https://www.henkel.com/press-and-media/press-releases-and-kits/2026-06-17-henkel-technology-suppo...
2•melenaboija•5m ago•0 comments

Show HN: Myco Brain – source-traceable memory for AI agents on your own Postgres

https://github.com/thegoodguysla/myco-brain
1•thegoodguys•5m ago•0 comments

Agent for AI Pricing Strategy

https://cloud.limitr.dev/assessment
1•AmeliaWampler•6m ago•0 comments

I told them forced consent was unlawful. 5 years later it cost Elkjop €1.8M

https://www.thatprivacyguy.com/blog/elkjop-forced-consent-fine/
1•speckx•6m ago•0 comments

Robert Mueller (2002): FBI looking to leverage AI to predict 9/11-style attacks

https://www.youtubetrimmer.com/view/?v=1QgQrU4ZMbM&start=1152&end=1196&loop=0
1•BostonFern•7m ago•0 comments

The most important conversational rule most people never learn [video]

https://www.youtube.com/watch?v=XdpnVowlawA
1•gmays•7m ago•0 comments

The AI Hate Progression

https://www.xodium.net/2026/06/the-ai-hate-progression.html
2•gpi•7m ago•0 comments

Show HN: Orchid – An AI Assistant

1•nizzyabi•8m ago•0 comments

DOJ aims to block suit over Musk data center pollution, citing national security

https://www.washingtonpost.com/technology/2026/06/16/justice-department-aims-block-lawsuit-agains...
3•1vuio0pswjnm7•8m ago•0 comments

Choji: Agents to take a customer ask to pull request autonomously

https://twitter.com/chptung/status/2067675275513798730
1•chptung•9m ago•0 comments

GLM-5.2: Benchmarks, Architecture and How to Run It

https://www.techaffiliate.in/blog/glm-5-2-how-to-use-free-benchmarks-review
1•Aditya_kachhawa•11m ago•0 comments

Infrastructure Is the Source of Truth

https://substack.com/@markellens/p-202605003
1•gpi•12m ago•0 comments

Compile Zod (30x faster Zod validation)

https://gajus.com/blog/optimize-zod
1•gajus2•14m ago•0 comments

Wolves outperform dogs in following human social cues

https://www.sciencedirect.com/science/article/abs/pii/S0003347208003631
3•berkeleyjunk•15m ago•0 comments

Show HN: ToNotDo – a tool that helps you know what NOT to do, not a todo app:)

https://tonotdo.cc
1•maz225•17m ago•0 comments

Ask HN: What is the job market like?

8•gardnr•17m ago•1 comments

GAN vs. VAE vs. Diffusion

https://research.rudrite.com/compare/gan-vs-vae-vs-diffusion
1•mridul_sahu•18m ago•0 comments

Show HN: 1pager: Fixing the AI verbosity problem

https://github.com/cfitzgerald-pd/1pager/tree/main
1•bennydog224•18m ago•0 comments

Billionaire tax proposal declared eligible for the November ballot

https://www.latimes.com/california/story/2026-06-17/controversial-billionaire-tax-proposal-appear...
1•1vuio0pswjnm7•18m ago•0 comments

Adding a give_feedback tool to our MCP server

https://www.sanity.io/blog/how-to-get-product-feedback-from-agents
1•kmelve•18m ago•0 comments

Matthias Wandel's web page overflow area

http://matt.wandel.ca
1•OJFord•18m ago•0 comments

Experimental Treatment Kills Prostate Tumor Cells While Increasing Immunity

https://news.weill.cornell.edu/news/2026/06/experimental-treatment-directly-kills-prostate-tumor-...
2•gmays•19m ago•0 comments