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

A practical guide to shipping with Claude Code

https://claude.dev/blog/the-work-after-you-open-a-pr/
1•saikatsg•4m ago•0 comments

I Build Engines Before I Build AI Agents?

https://www.reddit.com/r/AI_Agents/comments/1y7oaqc/why_i_build_engines_before_i_build_ai_agents/
1•kileo•7m ago•0 comments

3dcarparts.org May Have STLs for Your Next Auto Repair

https://hackaday.com/2026/11/29/3dcarparts-org-may-have-stls-for-your-next-auto-repair/
1•catab•8m ago•0 comments

Nations Must Die

https://marvindanig.com/
1•marvindanig•14m ago•0 comments

Epistemic Guard: out-of-process MCP receipts and post-turn claim checks

https://arxiv.org/abs/2611.27095
1•RollSolo•16m ago•0 comments

Ducktape for Energy Tech: Founder, Connector, Investor, Operator – Eshel Lipman

https://ecosystembets.substack.com/p/ducktape-for-energy-tech
1•yanir•16m ago•0 comments

PostgreSQL REST API Benchmarks

https://npgsqlrest.github.io/blog/benchmarks-2026-11/
1•vbilopav•25m ago•0 comments

Show HN

https://platform.ikawn.com/signin
1•vineetjaydeo•26m ago•0 comments

The Dataflow Model Revisited [pdf]

https://www.vldb.org/pvldb/vol19/p4953-fernandez-moctezuma.pdf
1•matt_d•27m ago•0 comments

Future-Proof Data Systems [pdf]

https://www.vldb.org/pvldb/vol19/p4965-giceva.pdf
1•matt_d•32m ago•0 comments

Social Experiment with Digital Artwork

https://wisetree.ventvox.app/
1•fractalmess•34m ago•1 comments

Datasetvet – check a Hugging Face dataset before you train on it

https://github.com/moelsaka01/datasetvet
1•moelsaka01•36m ago•0 comments

Return to the Boston Area After 50+ Years: What can we learn from VLDB 1975?

https://www.vldb.org/pvldb/vol19/p4983-srivastava.pdf
1•matt_d•40m ago•0 comments

Fast State-Machine Replication for Byzantine Systems and Blockchain

https://escholarship.org/uc/item/1mr7w8rs
1•otrack•41m ago•0 comments

You Can Learn Everything

https://youcanlearneverything.com/
1•joanwestenberg•43m ago•0 comments

Show HN: Moon Quest – pixel space platformer in one HTML file

https://cyberhx-spacectf.vercel.app
2•cyberhx•47m ago•0 comments

Show HN: MinGent – A supply-chain-resistant AI agent for Windows

https://mingent.org/
3•zenpositive•49m ago•0 comments

GlycoPezil – Daily Wellness and Blood Sugar Support

https://open.spotify.com/episode/4rIzBEWJPkLysPuY0E3vD7
1•johnncrosby•51m ago•1 comments

Show HN: Back in Time 1.7.0

https://github.com/bit-team/backintime/releases/tag/v1.7.0
2•buhtz•54m ago•1 comments

Show HN: Just going back to 2000s era build a have a look to space game

https://github.com/Tekush1/cyberhx_spacectf
1•cyberhx•54m ago•0 comments

Acorn – earn money running AI jobs on your Mac

https://acorncompute.com/
2•Austin_Conlon•56m ago•0 comments

AT&T L-carrier cable network (1960s/1970s era pre-fiber coaxial longhaul)

https://www.coldwarcomms.org/l5/
1•walrus01•57m ago•0 comments

Winning Comma AI's PCB Golf Contest

https://anasmalas.com/7999/
2•bschne•58m ago•0 comments

KarenBench: How Much of a Karen Is Any Given Superintelligence?

https://porkicoder.com/research/karenbench.html
1•atomicnature•1h ago•0 comments

How to make Agent tool chains work inside AppContainer

https://finshield.finogeeks.club/en/blog/appcontainer-child-processes.html
1•tgbaggio•1h ago•0 comments

Melting 3,041 Nespresso capsules to make a moka pot [video]

https://www.youtube.com/watch?v=sD7EUUR06VI
2•isnotchicago•1h ago•0 comments

Tsunami warning issued after 7.5 earthquake in the Aleutian Islands

https://cedarnews.net/newstasks/1214329/tsunami-warning-alaska/
1•extasetoi12•1h ago•0 comments

My Father, John le Carré, Knew Whom to Trust

https://www.nytimes.com/2026/11/29/opinion/john-le-carre-spies-morals.html
2•saikatsg•1h ago•0 comments

Bob – describe a mechanical part, get an editable solid in the browser

https://patriotxy.com/bob
2•feynmansletters•1h ago•0 comments

Show HN: OpenCode Subagent Router

https://github.com/JacobNWolf/opencode-subagent-router
3•JacobWolf•1h ago•0 comments