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

Court Agrees with EFF: Utah's VPN Law Demands a Technical Impossibility

https://www.eff.org/deeplinks/2026/10/court-agrees-eff-utahs-vpn-law-demands-technical-impossibility
1•mdp2021•18s ago•0 comments

I'm Calling for a Pause in the Development of the Universal Bone Dissolver

https://www.theatlantic.com/newsletters/2026/10/ai-slowdown-bone-dissolver/688854/
1•plastic-enjoyer•3m ago•0 comments

Tent Shamiyana Booking PHP Script – Complete Bartan and Event Booking System

1•wbthemes•5m ago•0 comments

Data-Driven Games

https://easel.games/blog/2026-oct-update
1•BSTRhino•6m ago•1 comments

Siemens Slams the Door Shut on Promising Open-Source Radioss Project

https://www.phoronix.com/news/Siemens-Ends-OpenRadioss
1•thunderbong•7m ago•0 comments

Experimental Evidence on the Learning Impact of Generative AI

https://arxiv.org/abs/2607.08849
1•Erikun•14m ago•0 comments

The Philadelphia Inquirer built Scrape, an AI tool to surface hyperlocal news

https://www.lenfestinstitute.org/solutions-resources/philadelphia-inquirer-scrape-ai-hyperlocal-n...
1•giuliomagnifico•14m ago•0 comments

Science or Slop?

https://yerimoh.github.io/scientific-slop-demo/
2•50kIters•18m ago•1 comments

Implementing Undo

https://www.youtube.com/watch?v=S6PqsZ65Mg4
1•vismit2000•18m ago•0 comments

Mermaid Infrastructure Diagrams in 3D

https://arcentry.com/blog/isometric-mermaid-diagrams-with-arcentry/
1•troika•18m ago•0 comments

PipeWire Is Awesome

https://denilson.sa.nom.br/blog/2023-11-06/pipewire-is-awesome
1•ankitg12•19m ago•0 comments

AI is the new React for recruiters

https://lucaskostka.com/posts/ai-is-the-new-react
1•greatNespresso•21m ago•0 comments

Causeval – statistically rigorous, causal evaluation for LLM apps

https://github.com/routsom/causeval
1•somrout•21m ago•0 comments

How to copy login keychains that can be unlocked

https://eclecticlight.co/2026/10/02/how-to-copy-login-keychains-that-can-be-unlocked/
1•frizlab•23m ago•0 comments

Nabby – minimal self-hostable yt-dlp web UI

https://nabby.pro/
1•njpteam•29m ago•0 comments

NSA: Post-Quantum Cryptography Resource Hub

https://www.nsa.gov/Cybersecurity/Post-Quantum-Cryptography-Resource-Hub/
1•donutloop•33m ago•0 comments

Senate Hearings to examine rogue AI

https://www.congress.gov/event/119th-congress/senate-event/338785
1•reasonableklout•33m ago•1 comments

PipeWire Setup and Fundamentals

https://www.benashby.com/resources/pipewire-setup-fundamentals/
2•ankitg12•35m ago•0 comments

Alexandria Eschate

https://en.wikipedia.org/wiki/Alexandria_Eschate
1•stein1946•35m ago•0 comments

"We're not going to shoot ourselves in the foot" over hack fallout, says OpenAI

https://www.technologyreview.com/2026/09/30/1145339/were-not-going-to-shoot-ourselves-in-the-foot...
1•joozio•37m ago•0 comments

Quantitative Finance with OCaml

https://qcaml.com/index.html
1•leonry•40m ago•0 comments

Land or Water?

https://twitter.com/karpathy/status/2105909609487872075
1•tosh•47m ago•0 comments

$250M Apple AI Settlement – iPhone 15/16 Users Can Claim $25 to $95 per Device

https://openclassactions.com/settlements/false-advertising/apple-intelligence-siri-false-advertis...
4•openclassaction•48m ago•1 comments

Show HN: Realtime eBay Filtering with Jev

https://tv.junkdrawer.ai
2•junkDrawer_ai•50m ago•0 comments

Show HN: Apple Developer MCP, App Store Connect via Your AI Assistants

https://nova.civai.co/agent/mcp-apple_developer
1•usecodenaija•50m ago•0 comments

PewDiePie's Ajax

https://data.pewdiepie.com/
2•dvrp•51m ago•0 comments

Claude Usage Monitor for Windows

https://github.com/mheilemann/ClaudeUsageMonitor/
1•mheilemann•51m ago•1 comments

US death row inmate survives execution attempt after two lethal injections

https://www.bbc.com/news/articles/cq8r6rjdvlx6o
1•vrganj•53m ago•0 comments

Booms, Bombs and Bonds: Interest Rates, Part I

https://paulkrugman.substack.com/p/booms-bombs-and-bonds-interest-rates
1•runeks•56m ago•0 comments

Microsoft's Big Copilot Rethink

https://www.theverge.com/tech/1003365/microsoft-copilot-os-for-work-notepad
1•saikatsg•58m ago•0 comments