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

Ask HN: How do I find startups hiring developers for low pay and equity?

1•Kathan2651•1m ago•0 comments

EU Cloud Service Providers List

https://www.eucloud.tech/en/eu-providers
1•pelagicAustral•3m ago•0 comments

Observability Design for the AI Era – App, Infra, CI, LLM (Part 1)

https://ryantsuji.dev/posts/ai-observability-design
1•ryantsuji•3m ago•0 comments

How to Ask Good Coding Questions That Get Great Answers (2016)

https://zellwk.com/blog/asking-questions/
1•mooreds•4m ago•0 comments

Show HN: Bastion – self-hosted VMs for background coding agents

https://github.com/bastion-computer/bastion
1•almostlit•5m ago•0 comments

ACM ByteCast Episode 2 Donald Knuth

https://learning.acm.org/bytecast/ep2-donald-knuth
1•Alien1Being•6m ago•0 comments

Get less visible and more European

https://bankosegger.me/blog/get-less-visible/
1•bankombinator•7m ago•0 comments

Managing Development Secrets on a Mac

https://www.yurikoval.com/blog/managing-development-secrets-on-a-mac.html
1•yurikoval•7m ago•0 comments

China's DeepSeek developing its own AI chip, sources say

https://www.reuters.com/world/china/chinas-deepseek-developing-its-own-ai-chip-sources-say-2026-0...
1•limoce•8m ago•0 comments

Long Lost Summers

https://olly.world/long-lost-summers
2•mooreds•8m ago•0 comments

Query Faster, Query Smarter: Our Move to DuckDB and What We Learned

https://medium.com/arcesium-engineering-blog/query-faster-query-smarter-our-move-to-duckdb-and-wh...
1•speckx•9m ago•0 comments

Show HN: Rememori zero-dependency agent memory that runs anywhere JS runs

https://rememori.dev
1•GiorgioDotcom•11m ago•0 comments

Use the alphabet: human-friendly geocoding, unlike what3words

https://ssrn.com/abstract=6879364
1•edmund_day•11m ago•1 comments

PDF 2.0: New Features, Real-World Impact

https://pdfa.org/pdf-2-0-new-features-real-world-impact/
1•Tomte•11m ago•0 comments

SMS for Hobbyist Projects

https://payne.org/projects/sms-for-hobbyists/
1•payne92•13m ago•1 comments

Show HN: DocFlow – AI documentation updates for GitHub pull requests

https://aicodedocumentationgenerator.com/
1•Aldasams•15m ago•0 comments

Fediverse.info: Social media that belongs to you

https://fediverse.info/
1•rapnie•17m ago•0 comments

CorvinOS – an agentic OS where GDPR/EU AI Act compliance can't be switched off

https://github.com/CorvinLabs/CorvinOS
1•shumway•20m ago•0 comments

Claude Code Antigravity CLI Agents Skill

https://github.com/markfulton/claude-antigravity-agents
1•DotSauce•20m ago•0 comments

Show HN: Mondael.com – Institutional Intelligence for Prediction Markets

https://mondael.com
3•16th_hop•21m ago•0 comments

Show HN: Sonn a reasoning layer that nudges coding agent before it makes mistake

https://sonn.dev
1•AlexSonn•22m ago•0 comments

Show HN: Phobos – A tiny scale-free kernel language with tile-DAG support

https://www.joa-ebert.com/posts/2026-07-07-phobos-lang/
2•joajoa•22m ago•0 comments

Eliminating Go bound checks with unsafe

https://blog.andr2i.com/posts/2026-07-06-eliminating-go-bound-checks-with-unsafe
1•g0xA52A2A•22m ago•0 comments

Most AI Work Can Wait

https://tomtunguz.com/ai-execution-routing/
2•speckx•23m ago•0 comments

Show HN: Excogni – open-source cognitive training that can't leak your email

https://xcgni.com/
1•brna-2•23m ago•0 comments

Amazon aims to raise $25B from bond sale, Bloomberg News reports

https://www.reuters.com/legal/transactional/amazon-aims-raise-25-billion-bond-sale-bloomberg-news...
3•enlightpixel•24m ago•0 comments

ScreenStack Is Looking for Design Partners

1•ud0•24m ago•0 comments

Mark Zuckerberg's biggest legal nightmare yet could cost Meta $1.4T

https://www.the-independent.com/tech/mark-zuckerberg-meta-fine-trillion-b3010281.html
15•wrxd•24m ago•1 comments

OpenCRA

https://github.com/borisRadonic/OpenCRA
3•BorisRadonic•26m ago•1 comments

The Gap Map v0.1

https://www.currentai.org/blogs/introducing-the-gap-map-v0-1
1•surprisetalk•27m ago•0 comments