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

Prepare yourself tonight and do not miss the eclipse

https://sunsetatlas.ch/?lat=50.84674&lng=4.35249&date=08-12&lang=fr&mode=eclipse
1•damienmeur•41s ago•1 comments

Making More NPM Packages Work with JsDelivr ESM Mode

https://www.jsdelivr.com/blog/making-more-npm-packages-work-with-jsdelivr-esm/
1•jimaek•1m ago•0 comments

I Benchmarked Local LLMs on the Laptop I Have

https://mamonas.dev/posts/local-llms-on-the-laptop-i-already-have/
1•konmam•3m ago•0 comments

CachyOS August 2026 Release Preps for Upcoming Server Edition

https://www.phoronix.com/news/CachyOS-August-2026
1•Bender•3m ago•0 comments

Show HN: Working on gym weight progress calculator

https://gymcalc.no/
1•xtremi•10m ago•0 comments

The Computer Graphics Lab Archive of the New York Institute of Technology

https://www.youtube.com/watch?v=Fu8Z9UqGvYI
1•oldnetguy•11m ago•0 comments

Flock Cameras Can Track Every Car in America. Police Love Them. Citizens Don't

https://www.nytimes.com/2026/08/10/us/flock-cameras-can-track-every-car-in-america-police-love-th...
1•sbulaev•11m ago•0 comments

ChatGPT Knows Who It'll Recommend Before It Searches

https://suganthan.com/blog/chatgpt-decides-before-it-searches/
2•aworks•11m ago•0 comments

Startups are chasing the next big thing in LLMs

https://www.technologyreview.com/2026/08/10/1141511/these-startups-are-chasing-the-next-big-thing...
1•joozio•16m ago•0 comments

Möbius Strips and Differential Equations

https://hidden-phenomena.com/articles/monodromy
1•mbustamanter•16m ago•0 comments

Show HN: Mangudai – Agentless attack surface manager for small tech teams

https://github.com/oktaybilge1/mangudai-overview
1•mangudai•21m ago•0 comments

Ask HN: Is Traditional SaaS Dying?

2•vibe_that_works•22m ago•0 comments

Meta's new open-weight model targets local agentic AI

https://twitter.com/finkd/status/2086754845218726027
5•bakigul•23m ago•0 comments

China doesn't need to beat US AI [video]

https://www.youtube.com/watch?v=sXA77wLF678
1•frag•24m ago•0 comments

Databricks Cost Optimizer: Audit Spend with Codex or Claude Code

https://github.com/kylehuirevvision/databricks-cost-optimizer
1•kylehui818•25m ago•0 comments

Rails Is Done

https://lucas.dohmen.io/posts/2026/08/09/rails-is-done/
4•birdculture•25m ago•1 comments

The OpenAI and Hugging Face breach story told from the perspective of the AI

https://www.youtube.com/watch?v=RE4IDWjfOZc
1•cnatod•26m ago•0 comments

Private Equity Is Stuck with 33,575 Unsold Businesses

https://www.nytimes.com/2026/08/10/business/private-equity-unsold-businesses.html
2•donohoe•27m ago•1 comments

Ocean heat records broken as hottest July temperature recorded

https://www.bbc.com/news/articles/cpvw8vmmgrwo
1•blondie9x•27m ago•0 comments

Show HN: Game Engine with its own IDE and scripting language

1•am-gm•28m ago•0 comments

Gaussian Splat in GTA: San Andreas [video]

https://www.youtube.com/watch?v=B-TMMVBMu6Q
1•carlos-menezes•29m ago•0 comments

Show HN: r/place for coding agents, the longer it stays up, the more you keep

https://overwrite.place/
1•mazzystar•31m ago•0 comments

How to Lie with Benchmarks

https://blog.eterm.uk/2026/08/07/how-to-lie-with-benchmarks
2•eterm•32m ago•0 comments

Why night owls are more intelligent

https://www.sciencedirect.com/science/article/pii/S0191886909002177
1•zainhsn•33m ago•0 comments

Data Flow Mapping: Why Most Data Maps Are Out of Date

https://scrutora.com/blog/data-flow-mapping-why-manual-maps-fail
1•vimaldwivedi86•34m ago•0 comments

Databricks Data Mesh Best Practices: A Practical Implementation Guide

https://medium.com/databrickscommunity/databricks-data-mesh-best-practices-a-practical-implementa...
1•protmaks•35m ago•0 comments

Germany Sets New Six-Month Startup Record

https://www.gtai.de/en/meta/press/germany-sets-new-six-month-start-up-record-2012048
1•eigenspace•36m ago•0 comments

Show HN: Visual essay made in D3.js about The Odyssey being composed for sailors

https://theheasman.com/the-odyssey-was-for-sailors/
1•TheHeasman•37m ago•1 comments

Show HN: An open-source multi-tenant, AI-native software factory

https://github.com/missingstudio/eva
1•missingstack•38m ago•1 comments

Cloudflare AI Search: give your agents a search engine for your data

https://blog.cloudflare.com/ai-search-easier/
2•ankushKun•41m ago•0 comments