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

Anthropic, Blackstone bet the next trillion-dollar AI business is implementation

https://techcrunch.com/2026/07/15/anthropic-blackstone-bet-the-next-trillion-dollar-ai-business-i...
1•jack1689•41s ago•0 comments

The Three-Second Theft: Why AI Voice Fraud Outruns Every Defence

https://smarterarticles.co.uk/the-three-second-theft-why-ai-voice-fraud-outruns-every-defence
1•dxs•56s ago•0 comments

Charles Atlas and the AI Bullies

https://cuencahighlife.com/charles-atlas-and-the-ai-bullies/
1•dxs•1m ago•0 comments

Verse: Build and hire autonomous AI employees from a single prompt

https://www.useverse.ai
1•realthomasgu•1m ago•0 comments

Forget reusability, aim for perfection [pdf]

https://www.openbsd.org/papers/bsdcan18-mandoc.pdf
1•rbanffy•2m ago•0 comments

GitHub is starting to lockdown some of the previously public data

1•punkpeye•2m ago•0 comments

Minvoice – invoicing app that runs on Cloudflare Workers and D1

https://github.com/ddyy/minvoice
1•ddyy•4m ago•1 comments

Can SiPearl Revive the European HPC and AI Chip Industry?

https://www.hpcwire.com/2026/07/14/can-sipearl-revive-european-hpc-and-ai-chips/
1•rbanffy•5m ago•0 comments

Taiga: Open source agile project management software

https://taiga.io/
1•janandonly•5m ago•0 comments

Free local AI video clipper – No Upload, All in browser

https://pocketweb.tools/video-clipper
1•shafkathullah•6m ago•0 comments

Show HN: An AUI for Nix-Darwin

https://github.com/dz0ny/nixmc
1•dz0ny•6m ago•0 comments

New York becomes first US state to suspend data centre development

https://www.ft.com/content/1c390476-9d93-4df5-9b41-7381db43b4ea
1•1vuio0pswjnm7•7m ago•0 comments

Meta used AI to tag workers who took leave to be laid off, lawsuit claims

https://www.theguardian.com/technology/2026/jul/14/meta-ai-mass-layoffs-lawsuit
3•Brajeshwar•8m ago•0 comments

Microsoft Confirms Windows GDID Device Identifier That Cannot Be Disabled

https://www.ghacks.net/2026/07/12/microsoft-confirms-windows-gdid-device-identifier-that-cannot-b...
1•robtherobber•8m ago•0 comments

Supabase just announced searchable encryption

https://supabase.com/blog/searchable-field-level-encryption-with-cipherstash
1•dandraper•9m ago•0 comments

Andreas Kirsch: DeepMind reportedly sold to Google on conditions

https://twitter.com/BlackHC/status/2077009476423647596
1•rurban•9m ago•0 comments

US Military smartphones targeted through roaming and ad tech

https://www.ft.com/content/44351c74-03c8-45ab-823b-5805c0daca5f
2•1vuio0pswjnm7•9m ago•0 comments

US to fund Trump-aligned Europeans building 'civilisational bonds'

https://www.ft.com/content/e2addd88-4361-43f1-94e2-9f0a808dd6a9
1•robtherobber•10m ago•1 comments

Bootstrapping Video Chat from the Terminal

https://nonogra.ph/bootstrapping-video-chat-from-the-terminal-07-15-2026
1•smalltorch•10m ago•0 comments

Show HN: A TypeScript repo where AI agents can't break the architecture

https://github.com/lucasgodt/open-agent-ready-typescript
1•lucasgodt•13m ago•1 comments

I Redesigned English

https://blog.tugulab.org/posts/2026-07-15_I-redesigned-English
2•ccarnino•13m ago•0 comments

Indian capital signs $1.57B subsidy to promotes EVs to tackle pollution

https://asia.nikkei.com/business/automobiles/electric-vehicles/indian-capital-promotes-evs-to-tac...
2•alephnerd•13m ago•0 comments

If you want Claude to speak nicely to you, try Hindi or Arabic

https://www.theregister.com/ai-and-ml/2026/07/14/if-you-want-claude-to-speak-nicely-to-you-try-hi...
1•Bender•14m ago•0 comments

Terrorized by a so-called "tech" company. When will they see justice?

https://www.nytimes.com/2026/07/13/technology/ebay-documentary-scandal-whatever-it-takes.html
1•1vuio0pswjnm7•15m ago•0 comments

Software bloat? This elevator needs an 8GB Core i5

https://www.theregister.com/offbeat/2026/07/15/software-bloat-this-elevator-needs-an-8gb-core-i5/...
2•Bender•15m ago•0 comments

China wants more babies – So it's cracking down on chatbot love affairs

https://www.wsj.com/tech/ai/china-wants-more-babiesso-its-cracking-down-on-chatbot-love-affairs-6...
1•ryan_j_naughton•15m ago•0 comments

Top Show HN Launches by Upvotes

https://rowset.lvtd.dev/share/datasets/fddae2f3-e103-47fe-9605-9ae2669ba059/
1•gregagi•16m ago•0 comments

States sue to block Paramount/WBD merger that was approved by Trump admin

https://arstechnica.com/tech-policy/2026/07/states-sue-to-block-paramount-wbd-merger-that-was-app...
1•rbanffy•16m ago•0 comments

Teamtype

https://github.com/teamtype/teamtype
1•surprisetalk•18m ago•0 comments

Claude Managed Agents add per-session overrides and lifecycle webhooks, Gemini

https://ddsboston.com/blogs/vibe-code-academy/ai-news-for-vibe-coders-daily-2026-07-15
1•robert_dds•18m ago•0 comments