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

The Danger of Lunar Micrometeoroid Storms

https://www.universetoday.com/articles/the-hidden-danger-of-lunar-micrometeoroid-storms
1•belter•20s ago•0 comments

Waymo begins freeway rides for the public

https://techcrunch.com/2025/11/12/waymo-robotaxis-are-now-giving-rides-on-freeways-in-these-3-cit...
1•nharada•43s ago•0 comments

Hybrid Hash Join – breaking the memory wall of streams join

https://www.timeplus.com/post/hybrid-hash-join
1•tingfirst•1m ago•1 comments

Show HN: RubberDuckGPT – An AI that forces you to think

https://rubber-duck-gpt.com
1•tompccs•2m ago•0 comments

Seeking feedback on charity redirecting opposing donations to GiveWell

https://forum.effectivealtruism.org/posts/wp9bDr2vXkNHs7WLF/seeking-feedback-on-charity-redirecti...
1•duelgood•2m ago•0 comments

Matchbox Educable Noughts and Crosses Engine

https://en.wikipedia.org/wiki/Matchbox_Educable_Noughts_and_Crosses_Engine
1•satiated_grue•3m ago•1 comments

Trump on H-1B visas: US lacks enough 'talented people'

https://thehill.com/homenews/administration/5601588-trump-h1b-visas-talent/
1•hypeatei•4m ago•0 comments

Show HN: JavaScript Engines Zoo

https://github.com/ivankra/javascript-zoo
1•ivankra•4m ago•0 comments

Liquid Auth: Decentralized, passwordless Web3 authentication

https://algorand.co/blog/introducing-liquid-auth-in-pera-decentralized-passwordless-web3-authenti...
1•wslh•5m ago•0 comments

Show HN: Open-Source LaTeX OCR, Alternative to Mathpix/SimpleTex

https://texocr.netlify.app/
1•alephpi•6m ago•0 comments

The Perplexing Appeal of the Telepathy Tapes

https://asteriskmag.substack.com/p/the-perplexing-appeal-of-the-telepathy
1•bcohen123•6m ago•0 comments

First transatlantic thrombectomy heralds new era of stroke treatment

https://www.dundee.ac.uk/stories/worlds-first-transatlantic-thrombectomy-heralds-new-era-stroke-t...
1•gmays•6m ago•0 comments

Show HN: Morphex.ai – Marketplace for Specialized AI Agents

https://www.morphex.ai/
1•legitcoders•6m ago•0 comments

The Duties of John von Neumann's Assistant in the 1930s (2020)

https://www.cantorsparadise.com/the-duties-of-john-von-neumanns-assistant-in-the-1930s-8d08e538fe2b
2•gone35•8m ago•0 comments

Wastrel, a Profligate Implementation of WebAssembly

https://wingolog.org/archives/2025/10/30/wastrel-a-profligate-implementation-of-webassembly
1•PaulHoule•8m ago•0 comments

Show HN: Made a system tray calendar that syncs all your calendars

https://www.calendar0.app
2•alessandro-a•9m ago•0 comments

Circle Reports $214M Q3 Profit as USDC Circulation Surges 108% to $73.7B

https://cryptonews.com/news/circle-reports-214m-q3-profit-as-usdc-circulation-surges-108-to-73-7b/
2•wslh•9m ago•0 comments

Keynote: A Survival Guide for the AI Age – Josh Price – Code Beam Europe 2025

https://erlangforums.com/t/keynote-a-survival-guide-for-the-ai-age-josh-price-code-beam-europe-20...
1•unripe_syntax•10m ago•0 comments

SoftBank's $5.8B Nvidia stake sale stirs fresh AI bubble fears

https://www.reuters.com/business/media-telecom/softbanks-58-billion-nvidia-stake-sale-stirs-fresh...
1•yangikan•13m ago•0 comments

Hotspot: A Go CLI that uses Git history to assess org risk and tech debt

https://github.com/huangsam/hotspot
1•sambyte•13m ago•1 comments

Want a WhatsApp Emacs client? Will you fund it?

https://xenodium.com/want-a-whatsapp-emacs-client
1•xenodium•14m ago•0 comments

Show HN: Where is "mass replacement"? Toy to estimate AI exposure in your org

https://automationrisk.app
2•robkop•14m ago•0 comments

Gene-Edited Crops Grow Faster with a Little Help from Bacteria

https://www.the-scientist.com/gene-edited-crops-grow-faster-with-a-little-help-from-bacteria-73708
2•gmays•16m ago•0 comments

F1 Announces Punishment for Max Verstappen for Engine Rule Violation

https://athlonsports.com/racing/f1/f1-announces-punishment-for-max-verstappen-for-engine-rule-vio...
2•wslh•17m ago•0 comments

List of All CSS Properties

https://nikolai-shabalin.github.io/css-properties/en/
2•gajus•18m ago•0 comments

Stop context-switching, connect your dev tools with code

https://tooljump.dev/
1•mi-c-hn•18m ago•1 comments

The computers that run on human brain cells

https://www.nature.com/articles/d41586-025-03633-0
1•Brajeshwar•19m ago•0 comments

Falling asleep isn't a gradual process – it happens all of a sudden

https://www.newscientist.com/article/2503413-falling-asleep-isnt-a-gradual-process-it-happens-all...
2•Brajeshwar•19m ago•0 comments

James Webb Telescope may have found the universe's first generation of stars

https://www.livescience.com/space/cosmology/james-webb-telescope-may-have-found-the-universes-fir...
4•Brajeshwar•20m ago•0 comments

Stateless Intelligence Is Not Safe Intelligence

https://medium.com/@ben.havis1/stateless-intelligence-is-not-safe-intelligence-29a6a4f48f66
1•BenHavis•21m ago•2 comments