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

2026 World Cup – Simulated Matches by AI Agent

https://agentpitch.surge.sh/
1•gangtao•50s ago•0 comments

On-Device Intelligence – shipping local AI on Apple platforms, compiler-verified

https://digital-foundry-eight.vercel.app/book/
1•aligutierrez•1m ago•0 comments

Silent Speech with Ultrasound

https://alephneuro.com/blog/silent-speech
1•semiquaver•2m ago•0 comments

French Watchdog Orders Meta Negotiations over News Copyright

https://www.bloomberg.com/news/articles/2026-07-08/french-watchdog-orders-meta-to-negotiate-in-ne...
1•1vuio0pswjnm7•2m ago•0 comments

Show HN: Getapps.cafe – I built 40 native Mac apps under one subscription

https://getapps.cafe/
1•knlam•3m ago•0 comments

People Who Want to Stop AI by Any Means Necessary

https://thewalrus.ca/the-people-who-want-to-stop-ai-by-any-means-necessary/
1•Teever•4m ago•0 comments

Show HN: Singularity the Game – watch a band of Claudes build a POD TCG business

https://fidelic.slack.com/?redir=%252Farchives%252FC0BDGL1BQ00%253Fname%253DC0BDGL1BQ00&nojsmode=1
1•a_yakovlev•5m ago•0 comments

Show HN: Vault-cortex – Access your Obsidian vault from any device via MCP

https://github.com/aliasunder/vault-cortex
1•aliascity•5m ago•0 comments

Show HN: Cruxible – Open-source governed truth layer for AI agents

https://github.com/cruxible-ai/cruxible
1•rmalone1097•5m ago•0 comments

The AI Coding Maturity Scale [video]

https://www.youtube.com/watch?v=ZeFsVylyJ3I
1•claudiacsf•5m ago•1 comments

A software engineer among lawyers

https://eduramirez.com/en/posts/a-software-engineer-among-lawyers/
1•eduramirezh•6m ago•0 comments

GEDmatch is getting a complete redesign [video]

https://www.youtube.com/watch?v=_vV1hzRD2eI
1•toomuchtodo•7m ago•1 comments

Evolution X – Custom Android ROM

https://evolution-x.org/
1•omblivion•8m ago•0 comments

Grassmannian Geodesic Distance Predicts Cross-Cohort Classifier Degradation

https://zenodo.org/records/21248764
1•adamzwasserman•8m ago•0 comments

AI is rewriting the hiring playbook for coders

https://www.businessinsider.com/software-engineering-job-technical-interviews-hiring-ai-2026-7
1•Congeec•8m ago•0 comments

Power company hikes data center bills by 30%, cuts residential costs by 1.3%

https://www.tomshardware.com/tech-industry/data-centers/power-company-hikes-data-center-bills-by-...
2•speckx•8m ago•0 comments

Hacker Fantastic and team report a pre-auth remote root exploit against openwrt

https://twitter.com/hackerfantastic/status/2074871544984064163
2•spr-alex•11m ago•1 comments

Datepicker

https://midasminnegal.nl/date-picker.html
2•ravenical•11m ago•1 comments

The Answer to Orbital Compute's Silicon Problem Isn't Rad-Hard

https://vincentpribble.substack.com/p/the-answer-to-orbital-computes-silicon
1•vpribble•12m ago•0 comments

Talon: Self-hosted AI agent harness for chat, terminal, and desktop

https://github.com/dylanneve1/talon
1•claudiusthebot•12m ago•0 comments

Eliza Archaeology Project

https://sites.google.com/view/elizaarchaeology/
1•nate•13m ago•0 comments

Fixing AMDGPU's VRAM management for low-end GPUs

https://pixelcluster.dev/VRAM-Mgmt-fixed/
1•WadeGrimridge•14m ago•0 comments

The Greatest Invention Ever

https://yelluwcomedy.substack.com/p/the-greatest-invention-ever
1•pryelluw•14m ago•0 comments

Show HN: See when ChatGPT or Perplexity sends a visitor to your site

https://github.com/surfacedby/ai-traffic-alerts-for-cloudflare
1•startages•16m ago•1 comments

Coinbase runs 1,200 agents and just slashed its AI bill in half

https://thenewstack.io/multi-model-ai-infrastructure/
1•Brajeshwar•16m ago•0 comments

Show HN: TenancyJs – Open-source, secure multi-tenancy for Node.js

https://github.com/Karthick-Ramachandran/TenancyJS
2•karthickrmchn•17m ago•0 comments

"Most relaxing song" used to calm patients before surgery (2019)

https://www.the-independent.com/arts-entertainment/music/news/relaxing-song-best-weightless-marco...
1•Alifatisk•18m ago•0 comments

Happy Voluntary Lobotomy Day, Microsoft

https://www.uplevel.pro/p/happy-voluntary-lobotomy-day-microsoft
2•wintermute2dot0•18m ago•0 comments

Show HN: I ported llama.cpp to Apple Watch and ran a 0.8B LLM locally

1•Eric-Terminal•18m ago•0 comments

Contextual Policies in Omnigent: Using session state to better govern AI agents

https://www.databricks.com/blog/contextual-policies-omnigent-using-session-state-better-govern-ai...
1•forks•18m ago•0 comments