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

Agent Torrent, can idle coding agents form a useful swarm?

https://devden.raghavan.studio/p/agent-torrent
1•raghavankl•1m ago•0 comments

Show HN: Plan your multi-day hut hikes in the alps

https://getcabinfever.com/
1•felixdoerp•3m ago•0 comments

SmartTAR 1.3.0

https://github.com/eco-by-different/smarttar-star
1•e_b_d•3m ago•1 comments

Show your hands honor for the power they bring you

https://aresluna.org/show-your-hands-honor/
1•Game_Ender•4m ago•0 comments

New World screwworm is disgusting. How could it not be a food safety issue?

https://www.cnn.com/2026/07/05/health/screwworm-food-safety
2•mooreds•7m ago•0 comments

Train and run transformers directly on Apple's Neural Engine

https://github.com/christopherkarani/Espresso
1•christkarani•7m ago•0 comments

Why DMARC's new "NP" tag can fail with DNSSEC

https://dmarcwise.io/blog/dmarc-np-incompatibility-with-dnssec
2•matteocontrini•9m ago•0 comments

Buckeye and Me

https://memoirland.substack.com/p/buckeye-and-me
1•mooreds•10m ago•0 comments

OpenAPI Initiative AI Policy

https://github.com/OAI/OpenAPI-Specification/blob/main/AI.md
1•mooreds•10m ago•0 comments

DNScanner (CLI)

https://github.com/ChinadaCam/DNScanner
1•ChinadaCam•11m ago•0 comments

Show HN: Santui, your terminal home base

https://github.com/sonyarianto/santui
1•sonyarianto•12m ago•0 comments

It's not about physical vs. digital games, it's about ownership

https://popcar.bearblog.dev/its-about-ownership/
1•popcar2•14m ago•0 comments

The Emoji Museum

https://emojistime.com/en/museum
1•kilroy123•14m ago•0 comments

Secure AI Sandboxes on Kubernetes

https://mitos.run/blog/ai-sandboxes-on-kubernetes
1•stubbi•15m ago•1 comments

Show HN: Small World – The "Preact" of 3D Web Engines (TypeScript, WebGPU)

https://rottensteiner-stefan.github.io/small-world/
1•DragonZoul•16m ago•0 comments

33434 Scottmanley (1999 FU)

https://ssd.jpl.nasa.gov/tools/sbdb_lookup.html#/?sstr=33434
1•root-parent•18m ago•0 comments

Show HN: AgentWatch – per-client cost tracking for LangChain agents

https://agentwatch-two.vercel.app/
1•hubi8120•19m ago•0 comments

Solar rail could become common in Europe after successful trial in Switzerland

https://www.euronews.com/2026/07/05/italy-could-be-the-next-country-to-build-a-solar-railway-afte...
3•neilfrndes•20m ago•1 comments

Show HN: microide, a 100% vibecoded IDE that LLM agents can drive

https://pablojimenezmateo.github.io/microide/
1•gef3233•21m ago•0 comments

OpenAI-Compatible DeepSeek API – No Chinese Phone Required

https://api.aifreeaistack.com
3•FreeAIStack•23m ago•0 comments

Infuriating Google commercial imagines the founding fathers embracing AI

https://www.theverge.com/ai-artificial-intelligence/961468/google-ai-commercial-founding-fathers-...
2•ilreb•26m ago•1 comments

Morphometrics: Introduction to the Analysis of Shape

https://www.geol.umd.edu/~tholtz/G331/lectures/331biomech.html
2•num42•26m ago•0 comments

Doorways do not always cause forgetting: a multimodal investigation (2021)

https://link.springer.com/article/10.1186/s40359-021-00536-3
2•bookofjoe•26m ago•0 comments

C programmers commit fresh crimes against readability

https://www.theregister.com/offbeat/2026/07/05/c-programmers-commit-fresh-crimes-against-readabil...
4•jjgreen•27m ago•1 comments

Challenging Caveman

https://pi-infected.github.io/token-harness-optimizer-leaderboard/
2•Tokenade•28m ago•1 comments

Female US rower completes historic solo journey from California to Hawaii

https://www.theguardian.com/us-news/2026/jul/04/california-hawaii-rowing-solo-journey
3•dwa3592•28m ago•0 comments

Self-hosted email client with an AI agent, running on Cloudflare Workers

https://github.com/cloudflare/agentic-inbox
3•Brajeshwar•31m ago•0 comments

Building your own electric motor – The Secret Genius of Modern Life(2023)[video]

https://www.youtube.com/watch?v=LoSGSawJCO0
2•thelastgallon•32m ago•0 comments

Hey YouTube WTF Is This?

https://www.youtube.com/watch?v=RIiKGoYXHVs
2•tcp_handshaker•33m ago•0 comments

Blog with AI Auto Poster

2•david3289•35m ago•0 comments