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

Oil and shipping tankers hacked in recent weeks, per report

https://techcrunch.com/2026/11/24/dozens-of-oil-and-shipping-tankers-hacked-in-recent-weeks-per-r...
1•speckx•57s ago•0 comments

Show HN: Hub, an open-source coordinator for Claude Code and Codex sessions

https://github.com/icons8/hub
1•kalimullin•1m ago•0 comments

Show HN: DuckDB client side AI spreadsheet

https://plexisai.vercel.app/
1•samarjoseph12•4m ago•0 comments

Google Built a Giant 'Mirror Dimension' Internet to Test Its Chrome AI Agents

https://www.wired.com/story/google-built-a-giant-mirror-dimension-internet-to-test-its-chrome-ai-...
1•noorsimar•4m ago•0 comments

Show HN: Clary reads iOS notifications in the sender's voice and keeps a history

https://hiclary.com/
2•vignesh_warar•5m ago•0 comments

Fund browser-grade certificate checking for every TLS client

https://upki.rustls.dev/funding.html
1•wofo•6m ago•0 comments

Dangerously Skip Permissions (Song)

https://suno.com/song/890b8848-6001-4d47-b1f6-76767070cf50
1•ekadet•7m ago•0 comments

Voyager 1 at one light-day: A conversation with Project Scientist Linda Spilker

https://www.planetary.org/articles/voyager-1-at-one-light-day-a-conversation-with-voyager-project...
1•sohkamyung•9m ago•0 comments

Building the Time Portal Engine

https://epochal.com/blog/building-the-time-portal-engine
2•jgrahamc•11m ago•0 comments

Show HN: HackerBrain, Book as a Model, 250 HN books into 50K+ rules, offline

https://www.enano.ai
2•shanedevane•11m ago•1 comments

Keys to Optimizing End-to-End Latency with WebRTC

https://www.red5.net/blog/keys-to-optimizing-end-to-end-latency-with-webrtc/
1•mondainx•12m ago•0 comments

Calif. AG: Character.ai to auction off users' IP addresses and chat histories

https://oag.ca.gov/news/press-releases/attorney-general-bonta-opposes-asset-sale-characterai-amid...
1•anon373839•12m ago•0 comments

TDGs, Part 2: Why Do TDGs Accelerate Expertise?

https://jtpeterson.substack.com/p/tdgs-part-2-why-do-tdgs-accelerate
1•surprisetalk•13m ago•0 comments

When a failed API write succeeds 11 seconds later

https://medium.com/affirmengineering/pump-the-brakes-automating-rollouts-and-knowing-when-to-stop...
1•alexanderstatni•17m ago•0 comments

MD study of force field accuracy for fatty acid-based phase change materials

https://www.nature.com/articles/s41598-026-80735-3
1•yunessalman•20m ago•0 comments

How did the United States become a lawyerly society?

https://marginalrevolution.com/marginalrevolution/2026/11/how-did-the-united-states-become-a-lawy...
1•smitty1e•22m ago•0 comments

Open benchmark: how close pptx renderers get to PowerPoint

1•avadaniels•24m ago•0 comments

Wall Street Expects Anthropic's Committed $900B Debt to Be Junk

https://www.wsj.com/finance/investing/anthropic-committed-to-spend-900-billion-wall-street-expect...
5•mgh2•24m ago•0 comments

Hiring Data Engineers

https://wd1.myworkdaysite.com/en-US/recruiting/ssctech/SSCTechnologies/details/Sr-Engineer-Ontolo...
1•joestein-ssnc•25m ago•1 comments

All the lists you could ever need

https://awesomelist.link/
1•pathwaysdigital•30m ago•0 comments

InferNode gives Bell Labs' Inferno OS a 64-bit second wind

https://www.theregister.com/os-platforms/2026/11/24/infernode-gives-bell-labs-inferno-os-a-64-bit...
1•rbanffy•31m ago•0 comments

xAI Founders Unveil New AI Startup to Predict Future Events

https://www.bloomberg.com/news/articles/2026-11-24/xai-founders-unveil-new-ai-startup-to-predict-...
3•matthewsinclair•32m ago•1 comments

Should you feel grief for the dead who go to heaven?

https://marginalrevolution.com/marginalrevolution/2026/11/should-you-feel-grief-for-the-dead-who-...
1•surprisetalk•33m ago•0 comments

Using AI+Lean to optimize and improve existing code

https://share.thomas.md/leanldgr
2•r0ze-at-hn•34m ago•0 comments

Aster – An open-source desktop pet for Claude Code

https://github.com/Nennie7W/aster-pet
1•Nennie7•34m ago•0 comments

Do inconsistent docs hurt AI coding agents?

https://developer.microsoft.com/blog/do-inconsistent-docs-hurt-ai-coding-agents/
1•waldekm•36m ago•0 comments

Show HN: Kindstats – Privacy-first web analytics with 100% EU infrastructure

https://kindstats.com/
2•sparkling•38m ago•0 comments

Claude Code vs. Gato AI Translations: Translating a WordPress Site to 100%

https://gatoaitranslations.com/blog/claude-code-vs-gato-ai-translations
1•leoloso•44m ago•0 comments

Educational OS fundamentals interactive tool

https://claude.ai/artifact/92CFxQiGu7rarFhhtkf1e1
2•omar77•44m ago•0 comments

Bosses loved AI at work – until they drowned in slop

https://www.businessinsider.com/ai-generated-workslop-leads-to-policies-firings-boss-fed-up-2026-11
7•gpi•45m ago•1 comments