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

MuscleMemory: Open-source procedural memory for AI agents

https://github.com/TheWariend/MuscleMemory
2•maaaz•2m ago•0 comments

Reverse Engineering Community Shuts Down Because AI Has Made It Too Easy

https://www.404media.co/video-game-reverse-engineering-community-shuts-down-because-ai-has-made-i...
1•atan2•3m ago•0 comments

Resolute – American presidency simulator on the browser

https://resolutethegame.com
1•weinhaus•6m ago•0 comments

Order to limit Starshield for Ukraine came from inside White House, sources say

https://www.reuters.com/world/europe/order-limit-starshield-ukraine-came-inside-white-house-sourc...
2•geox•6m ago•0 comments

The Tesla Roadster flew, drove upside down, and hit 60mph in under a second

https://www.theverge.com/transportation/1012552/tesla-roadster-next-gen-reveal-elon-musk
2•avonmach•7m ago•0 comments

Moron Observer

https://moron.observer/nav-index.html?q=0
1•vomablass•8m ago•0 comments

How Did Israel Become "Startup Nation"? (2009)

https://freakonomics.com/2009/12/how-did-israel-become-start-up-nation/
1•myth_drannon•12m ago•0 comments

I survived two school shootings. This is what I learned

https://www.theatlantic.com/ideas/2026/05/i-survived-two-school-shootings/687295/
2•7777777phil•21m ago•0 comments

Matt Mullenweg Orders Accessibility Revert, Bans Core Wordpress Committer

https://www.therepository.email/matt-mullenweg-orders-accessibility-revert-tells-core-committer-t...
3•slyall•21m ago•0 comments

Tesla reveals SpaceX-powered Roadster that flies

https://techcrunch.com/2026/10/15/tesla-reveals-spacex-powered-roadster-that-flies-and-falls-with...
2•mikelgan•22m ago•1 comments

AI training data and RL environment vendors

https://whosellsdata.com/
1•measurablefunc•24m ago•0 comments

Roadster Event

https://www.youtube.com/watch?v=qt5p-_tE8d0
1•quyleanh•27m ago•1 comments

Is Google Making Us Stupid? (2008)

https://hermiene.net/literature/essays/is-google-making-us-stupid
3•shubhamjain•27m ago•2 comments

Warped Mirrors

https://jamespember.substack.com/p/warped-mirrors
2•jep888•29m ago•0 comments

Show HN: Beeline Multiplayer Agent Harness

https://usebeeline.app
1•lunchboxfortwo•30m ago•0 comments

Soil-Based Carbon Sequestration

https://climate.mit.edu/explainers/soil-based-carbon-sequestration
1•thelastgallon•33m ago•1 comments

Investors temper Anthropic IPO valuation expectations as revenue growth slows

https://www.reuters.com/business/finance/investors-temper-anthropic-ipo-valuation-expectations-ov...
2•byzantinegene•33m ago•0 comments

Tiny Flaws in Glass Fiber Can Help Reveal Undersea Cable Threats

https://spectrum.ieee.org/undersea-cables-acoustic-sensing
1•snarky-comments•34m ago•0 comments

Fibre sensing: how undersea cables learned to listen

https://www.lowyinstitute.org/the-interpreter/fibre-sensing-how-undersea-cables-learned-to-listen
2•snarky-comments•37m ago•0 comments

Show HN: Wayseer – A native desktop app for browsing real-time data

https://wayseer.app/
1•jlm66•38m ago•0 comments

Fractal Recursion, Bounded Infinity, and Adapted Systems

https://medium.com/towards-artificial-intelligence/fractal-recursion-bounded-infinity-and-adapted...
1•attractor26•40m ago•0 comments

Accenture Tells Employees They Can Now Spend Only $29 on Claude per Month

https://www.404media.co/accenture-tells-employees-they-can-now-spend-only-29-on-claude-per-month/
2•gmays•41m ago•2 comments

Show HN: Firmenza – An AI employee for SAM.gov

https://firmenza.com
2•mahmoudabusaqer•41m ago•2 comments

Show HN: GrapheneOS Dumbphone

https://github.com/flourish-today/Odysseus
2•flourish_dev•42m ago•0 comments

Show HN: Inherit – Zero to Iac

https://inherit.virtualbeck.com/
1•virtualbeck•43m ago•0 comments

Ask HN: Thoughts about the Gemini Web app?

2•duckiec•44m ago•1 comments

Teaching Math to Young Children

https://ies.ed.gov/ncee/wwc/PracticeGuide/18
3•measurablefunc•44m ago•0 comments

Space (AI agent containment sandbox) software open source

https://au.finance.yahoo.com/news/perplexity-open-source-tool-used-180212360.html
2•noobplus•58m ago•1 comments

Gemini 4 Argon in Antigravity to Paid Google AI Pro

https://twitter.com/antigravity/status/2110866531932316011
2•karp773•1h ago•1 comments

OpenWebAnalytics-Self-hosted GoogleAnalytics aimed for privacy

https://www.openwebanalytics.com/
2•zlu•1h ago•1 comments