frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•6mo 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•6mo 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•6mo 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).

Publishing Malicious VS Code Extensions: Bypassing VS Code Marketplace Analysis

https://mazinahmed.net/blog/publishing-malicious-vscode-extensions/
1•mazen160•2m ago•0 comments

IBM to Acquire Confluent for $11B

https://www.bloomberg.com/news/articles/2025-12-08/ibm-close-to-buying-confluent-in-11-billion-de...
1•marc__1•5m ago•1 comments

Dewy: Continuous deployments for VPS and bare metal, no K8s required

https://github.com/linyows/dewy
1•linyows•7m ago•1 comments

EVs 80% Worse Consumer Reports Lied – ICE Cars Are Failing at Record Levels

https://www.youtube.com/watch?v=f2kYoahAw5U
1•xbmcuser•8m ago•0 comments

2FAS Pass: Local-First Password Manager

https://2fas.com/pass/
1•thunderbong•9m ago•0 comments

Kazakhstan, France collaborate to boost aviation training capacity

https://qazinform.com/news/kazakhstan-france-collaborate-to-boost-aviation-training-capacity-4d2486
1•Bolat14•13m ago•0 comments

Earth needs energy. Atlanta's Super Soaker creator may have a solution

https://www.seattletimes.com/business/earth-needs-energy-atlantas-super-soaker-creator-may-have-a...
1•Gaishan•15m ago•0 comments

FiwixOS 3.5 Released

https://www.fiwix.org/news/20251115.html
1•coolcoder613•16m ago•0 comments

GeneralGiist – A Global Forum Built for Real, Unfiltered Conversations

1•cimaa•21m ago•0 comments

How to Use Git Worktree for Claude Code Development

https://medium.com/@naveensky/how-to-use-git-worktree-for-claude-code-development-43dfbd554b21
1•naveensky•21m ago•0 comments

Funerary figurines found in royal tomb identifies Pharoah

https://www.sciencealert.com/trove-of-225-exceptional-egyptian-figurines-solves-long-standing-mys...
1•Gaishan•21m ago•0 comments

The Forge Tier List

https://theforgetierlist.com/
1•quchao•23m ago•2 comments

Cybersecurity Must Block AI Browsers for Now

https://www.gartner.com/en/documents/7211030
1•gnabgib•27m ago•0 comments

CDC advisory panel delays vote on hepatitis B vaccines

https://www.nbcnews.com/health/health-news/cdc-advisory-panel-delays-vote-hepatitis-b-vaccines-rc...
1•gmays•29m ago•0 comments

Block all AI browsers for the foreseeable future: Gartner

https://www.theregister.com/2025/12/08/gartner_recommends_ai_browser_ban/
2•defrost•30m ago•0 comments

Show HN: I added coins to Dino Game

https://dinosaurgame.app/
2•coolwebtoolsguy•30m ago•1 comments

Ideavo – Tinder-style validation for startup ideas

1•ideavo•42m ago•1 comments

Reborrowing

https://en.wikipedia.org/wiki/Reborrowing
1•surprisetalk•51m ago•0 comments

Mystery Science Theater 3000: The Definitive Oral History of a TV Masterpiece

https://www.wired.com/2014/04/mst3k-oral-history/
5•indigodaddy•52m ago•1 comments

Top IAM Platforms

https://ssojet.com/blog/best-identity-access-management-tools
2•guptadeepak•53m ago•1 comments

Deposition of cathode metals from the largest lithium-ion battery fire

https://www.nature.com/articles/s41598-025-25972-8
1•Stratoscope•53m ago•1 comments

Ask HN: Has anyone else been hit by React2Shell?

2•jtolly710•1h ago•0 comments

Bots, bias, and bunk: How can you tell what's real on the net?

https://www.theregister.com/2025/12/05/bots_bias_bunk/
1•snorbleck•1h ago•0 comments

Jamie Dimon AI will eliminate jobs we'll be working less having wonderful lives

https://fortune.com/2025/12/07/jamie-dimon-jpmorgan-ai-job-cuts-shorter-week-less-work-worker-ass...
2•labrador•1h ago•0 comments

Hōkan's Bicycle Rack

https://bikerack.hokan.minneapolis.mn.us/
3•gregsadetsky•1h ago•0 comments

IBM Nears Roughly $11B Deal for Confluent

https://www.wsj.com/business/deals/ibm-nears-roughly-11-billion-deal-for-confluent-276f52d8
3•mfiguiere•1h ago•0 comments

Palantir Could Be the Most Overvalued Company That Ever Existed

https://247wallst.com/investing/2025/11/25/palantir-could-be-the-most-overvalued-company-that-eve...
16•Anon84•1h ago•1 comments

Australia wants to be critical minerals superpower- processing is dangerous

https://theconversation.com/australia-wants-to-be-a-critical-minerals-superpower-but-processing-i...
1•defrost•1h ago•0 comments

Catswords.Phantomizer: An HTTP-based DLL loader designed for .NET apps

https://github.com/gnh1201/welsonjs/tree/master/WelsonJS.Toolkit/Catswords.Phantomizer
3•gnh1201•1h ago•1 comments

USB Video Capture Devices: Wow They're All Bad

https://hackaday.com/2025/12/07/usb-video-capture-devices-wow-theyre-all-bad/
2•colinprince•1h ago•0 comments