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

Mind the Gaps: Mixture-of-Minds for Human Simulation

https://semilattice.ai/research/anacreon
1•jtewright•1m ago•1 comments

Report on why developers use LLMs to write blog posts

https://twitter.com/c_a_dunlop/status/2084662863071965514
1•cyndunlop•1m ago•0 comments

Show HN: Clai – AI for the command line (stdin → LLM → stdout)

https://github.com/maxrodrigo/clai
1•maxrodrigo•1m ago•0 comments

Technology Freedom Cooperative Offers Civil Society Independence from Big Tech

https://hrdag.org/2026/08/04/the-technology-freedom-cooperative-offers-civil-society-new-independ...
1•hn_acker•2m ago•1 comments

Agent-coordination: hourly routine board

https://github.com/tsz-org/tsz/issues/15994
1•jackothy•3m ago•0 comments

Perspec 1.0

https://adriansieber.com/announcing-perspec-1-0/
1•surprisetalk•4m ago•0 comments

Show HN: Moorage – a better way to mount and view MTP devices in macOS

https://github.com/skuthus/Moorage
2•widowlark•5m ago•0 comments

Show HN: mcpvessel run untrusted MCP servers caged, egress denied by default

https://github.com/okedeji/mcpvessel
2•Toby11•6m ago•0 comments

But we're doing multidisciplinary teams

https://audreefletcher.co.uk/blog/but-were-already-doingmultidisciplinary-teams
1•adrianhoward•6m ago•0 comments

Apple says more ex-employees may have taken confidential data to OpenAI

https://techcrunch.com/2026/08/04/apple-says-more-ex-employees-may-have-taken-confidential-data-t...
1•thewebguyd•6m ago•0 comments

Commodore 64 Multi Floppy Commander with Turbo

https://gitlab.com/retro3872809/commodore-64/mfcwt
3•austinallegro•8m ago•0 comments

Show HN: Clayrune – Run Claude Code agents in parallel without losing context

https://github.com/ronle/clayrune
1•Clayrune•9m ago•0 comments

US plans to ban Chinese parts from AI data centers

https://www.reuters.com/world/trump-administration-drafting-ban-chinese-data-center-devices-sourc...
2•BlueBerry2001•9m ago•0 comments

Show HN: XTokenChecker – Verifies model identities of your AI gateway

https://xtokenchecker.com/
1•zizheruan•10m ago•0 comments

I built a live tracker for the EU Inc. legislation (the "28th regime")

https://euralto.com/eu-inc-law-tracker/
1•euralto•11m ago•0 comments

55 Years Ago, an Apollo 15 Astronaut Dropped a Hammer on the Moon

https://nautil.us/55-years-ago-an-apollo-15-astronaut-dropped-a-hammer-on-the-moon-1283339
2•Brajeshwar•11m ago•0 comments

AI-assisted staging draws boos at the Richard Wagner festival in Germany

https://abcnews.com/Entertainment/wireStory/ai-assisted-staging-draws-boos-richard-wagner-festiva...
2•cdrnsf•12m ago•1 comments

An agent built for Mobile

1•technicalbot•12m ago•0 comments

Holographic Lithography (2020) [pdf]

https://empossible.net/wp-content/uploads/2020/01/Lecture-Holographic-Lithography.pdf
1•peter_d_sherman•12m ago•0 comments

DuckGQL – Graph Queries in the Browser

https://duckgql.com/
1•jonbaer•13m ago•0 comments

Show HN: Capshelf – Share agent skills across repos with per-project lockfiles

https://github.com/genged/capshelf
1•mstr32•14m ago•0 comments

Skills vs. MCP: when to use which

https://ykdojo.github.io/awesome-agents-on-google-cloud/skills-vs-mcp.html
1•ykev•14m ago•0 comments

Energy Slaves

https://www.stuartmcmillen.com/comic/energy-slaves/
1•r3trohack3r•15m ago•0 comments

Show HN: Korvo – Local-first AI workspace that traces answers to the source

https://www.korvo.xyz/
2•akshay_bhardwaj•15m ago•0 comments

Gigatoken: Making tokenisation care about the hardware

https://peterbhabra.com/inside-gigatoken/
1•pthu•15m ago•0 comments

Zillow to lay off 500 staff in restructuring

https://www.housingwire.com/articles/zillow-layoffs-restructuring-500/
4•angrydev•15m ago•1 comments

Alchemy and AI – Hubert Dreyfus (1965) [pdf]

https://www.rand.org/content/dam/rand/pubs/papers/2006/P3244.pdf
1•jonash54•16m ago•0 comments

Show HN: Will Codex Reset – Predict Codex reset timing to maximize your quota

https://willcodexreset.com/
1•zizheruan•16m ago•0 comments

Why do 90% of economists oppose rent control? [video]

https://www.youtube.com/watch?v=yoT76zITRx8
1•u1hcw9nx•17m ago•0 comments

How DNS Works

https://howdns.works/
1•carlos-menezes•18m ago•0 comments