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

China's BEV Trucks and the End of Diesel's Dominance

https://cleantechnica.com/2025/11/26/chinas-bev-trucks-and-the-end-of-diesels-dominance/
1•xbmcuser•19s ago•0 comments

Japan's human washing machines will go on sale to general public

https://soranews24.com/2025/11/28/japans-human-washing-machines-will-go-on-sale-to-general-public...
1•zdw•2m ago•0 comments

Why can't ChatGPT tell time?

https://www.theverge.com/report/829137/openai-chatgpt-time-date
1•ent101•7m ago•0 comments

OpenAI discloses API customer data breach via Mixpanel vendor hack

https://www.bleepingcomputer.com/news/security/openai-discloses-api-customer-data-breach-via-mixp...
1•DANmode•10m ago•0 comments

Shor's algorithm: the one quantum algo that ends RSA/ECC tomorrow

https://blog.ellipticc.com/posts/what-is-shors-algorithm-and-why-its-the-single-biggest-threat-to...
2•iliasabs•21m ago•0 comments

After such knowledge, what forgiveness?

https://www.stevesailer.net/p/after-such-knowledge-what-forgiveness
1•tartoran•25m ago•0 comments

PpenPanzer: JavaScript/HTML5 rewrite of Panzer General 2 game

https://github.com/nicupavel/openpanzer
1•ibobev•27m ago•0 comments

CiaoTool – No-Code Multi-Chain Token Creation and Management Platform

https://ciaotool.io/en-US
1•CiaoTool•28m ago•1 comments

OpenAI Codex Plan / Spec Mode – We'd Love Your Input

https://github.com/openai/codex/discussions/7355
1•wahnfrieden•30m ago•0 comments

The VPN panic is only getting started

https://www.theverge.com/tech/827435/uk-vpn-restrictions-ban-online-safety-act
9•cebert•32m ago•2 comments

Local LLM based code reviews at Scripbox

https://medium.com/@jpranav97/zero-cost-code-reviews-self-hosted-qwen2-5-coder-on-gitlab-ci-80104...
1•vasuadari•33m ago•1 comments

Tell HN: Gemini 3 found a stack smash in a hex dump that I missed

2•leo_e•35m ago•0 comments

Quantica: A Python-like language with native quantum computing built in

https://github.com/Quantica-Foundation/quantica-lang
1•gurukasi2006•41m ago•0 comments

My car charger can boil water really fast [video]

https://www.youtube.com/watch?v=INZybkX8tLI
1•zdw•42m ago•0 comments

What's in a Button?

https://belkadan.com/blog/2025/11/Whats-in-a-Button/
2•todsacerdoti•47m ago•0 comments

Nvidia reportedly no longer supplying VRAM to GPU partners due to memory crunch

https://www.tomshardware.com/pc-components/gpus/nvidia-reportedly-no-longer-supplying-vram-to-its...
1•lysp•48m ago•0 comments

Jeffrey Epstein Was the Unofficial Advice Columnist for the Elites

https://defector.com/jeffrey-epstein-was-the-unofficial-advice-columnist-for-the-elites
6•tartoran•52m ago•0 comments

Former MIT scientist Joscha Bach funded by Epstein made racist claims in private

http://www.bostonglobe.com/2025/11/21/metro/epstein-emails-mit-joscha-bach/
2•tartoran•53m ago•0 comments

Investigating a Possible Scammer in Journalism's AI Era

https://thelocal.to/investigating-scam-journalism-ai/
2•pseudolus•59m ago•0 comments

Ask HN: What's the point of starting a startup if the failure rate is so high?

3•anon115•1h ago•5 comments

Can RGB light strips produce 16M colors?

2•emmasuntech•1h ago•0 comments

Show HN: I built a website for games that catch my eye

https://alistof.games
2•RaycatRakittra•1h ago•1 comments

Show HN: RcloneView – a GUI for rclone with 50% Black Friday deal

https://rcloneview.com/
1•newclone•1h ago•0 comments

Software Freedom Conservancy 2025 Fundraiser launched with largest match yet

https://sfconservancy.org/news/2025/nov/26/2025-fundraiser-launched-with-largest-match-yet/
2•pabs3•1h ago•0 comments

Calcium Deposits in the Arteries Not Always a Worry (2023)

https://www.mcgill.ca/oss/article/medical/calcium-deposits-arteries-not-always-worry
1•stacktrust•1h ago•0 comments

Former Google chief accused of spying on employees through account 'backdoor'

https://www.latimes.com/business/story/2025-11-20/former-google-chief-accused-of-spying-on-employ...
4•perihelions•1h ago•1 comments

Clog and Clog Builder 2.4

https://github.com/rabbibotton/clog/releases/tag/v2.4
5•mike_ivanov•1h ago•1 comments

A Boy They Called a Horse

https://biblicalman.substack.com/p/the-boy-they-called-a-horse
2•koolhead17•1h ago•0 comments

Secure Programming with Static Analysis [pdf]

https://ptgmedia.pearsoncmg.com/images/9780321424778/samplepages/9780321424778.pdf
1•ibobev•1h ago•0 comments

Eric Schmidt's ex-mistress sues former Google CEO over alleged stalking, abuse

https://nypost.com/2025/10/20/business/eric-schmidts-ex-mistress-31-sues-former-google-ceo-70-ove...
2•perihelions•1h ago•0 comments