frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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

Wikipedia's bot traffic to overtake human readers by late 2026 (original data)

https://technicalseonews.com/analysis/wikipedia-bot-traffic-replacing-humans
1•SimilarWeb•34s ago•0 comments

Tracking historical progress against slavery and forced labor

https://ourworldindata.org/slavery
1•surprisetalk•1m ago•0 comments

Coders in 2030 be like: (Rick Rubin, Vibe Producer)

https://old.reddit.com/r/ClaudeAI/comments/1tbgj86/coders_in_2030_be_binlike/
1•consumer451•2m ago•1 comments

Conway's Law Teaches a Grim Lesson About AI in Product Development

https://brodzinski.com/2026/04/conways-law-ai-product-development.html
1•flail•2m ago•0 comments

AI agents make small companies bigger

https://text-incubation.com/ai-agents-make-small-companies-bigger
1•krrishd•2m ago•0 comments

Show HN: RedactScreen – Share your screen, not secrets

https://redactscreen.com/
1•madospace•3m ago•0 comments

Show HN: A Browser Built for Agents

https://github.com/monkeysee-ai/rotunda
1•icyfox•3m ago•0 comments

Publishers: Google's eBook Ad "Ban" Blocked Legitimate Sellers, Not Pirates

https://torrentfreak.com/publishers-googles-ebook-ad-ban-blocked-legitimate-sellers-not-pirates/
1•Brajeshwar•3m ago•0 comments

The syrup of crime bears sticky fruit

https://www.metafilter.com/212975/The-syrup-of-crime-bears-sticky-fruit
1•PaulHoule•4m ago•0 comments

What Inference-Platform Benchmark Posts Leave Out

https://ingero.io/inference-platform-benchmark-posts-leave-out/
1•ingero_io•5m ago•0 comments

Map Your Neighborhood Your Own Way

https://www.instructables.com/Mahttps://www.instructables.com/Map-Your-Neighborhood-Your-Own-Wayp...
1•innocentlife•5m ago•0 comments

Fine-Tuning TranslateGemma-4B for Better Welsh Translations on an H200 GPU

https://metalglot.com/blog/welsh-translategemma-finetuning-guide/
1•metalglot•5m ago•1 comments

Show HN: A "Git history" for Twitter/X profiles

https://tracktweets.com
1•code-less•6m ago•0 comments

WordStar

https://www.sfwriter.com/wordstar.htm
2•andsoitis•8m ago•0 comments

Reliance on Middle East Oil and Gas Supplies by Country

https://www.iea.org/data-and-statistics/data-tools/reliance-on-middle-east-oil-and-gas-supplies-b...
1•gmays•8m ago•0 comments

Linguistic workaround allows Marco Rubio to travel to China

https://www.theguardian.com/us-news/2026/may/13/marco-rubio-china-visit-new-character-name-trump-...
1•neaden•9m ago•0 comments

Social market liberalism has no political home in India

https://ordinaryanalysis.substack.com/p/the-inner-dialogue-of-a-social-market
1•shibaprasadb•10m ago•0 comments

Fragnesia: Linux kernel local privilege escalation via ESP-in-TCP

https://www.wiz.io/blog/fragnesia-linux-kernel-local-privilege-escalation-via-esp-in-tcp
2•ljahier•10m ago•0 comments

Finnish marketplace for 'Environmentally responsible actions'

https://luontoarvot.fi/en
1•Mossy9•10m ago•0 comments

Your AI Frustration Is My Opportunity

https://metedata.substack.com/p/012-your-ai-frustration-is-my-opportunity
1•young_mete•10m ago•0 comments

Open source voice-to-text for Linux. And macOS

https://ostt.ai
1•gann_•11m ago•0 comments

Software Developers Say AI Is Rotting Their Brains

https://www.404media.co/software-developers-say-ai-is-rotting-their-brains/
2•SpyCoder77•12m ago•0 comments

Anduril raises $5B in Series H

https://www.anduril.com/news/anduril-announces-usd5b-series-h-raise
2•protortyp•13m ago•0 comments

Rug Pulled

https://unsung.aresluna.org/rug-pulled/
1•speckx•13m ago•0 comments

Cerebras to raise IPO price range to $150-$160 as demand surges

https://www.reuters.com/legal/transactional/cerebras-raise-ipo-price-range-150-160-demand-surges-...
1•nsoonhui•13m ago•0 comments

Resilience vs. Efficiency

https://www.csis.org/analysis/resilience-vs-efficiency
1•andsoitis•14m ago•0 comments

5 Years and $5M Later: Creating a New Language for Web Development Was a Mistake

https://wasp.sh/blog/2026/05/13/new-language-for-web-dev-was-a-mistake
2•matijash•17m ago•0 comments

Show HN: Headless Cloud Security – Headless SaaS has come to security

https://www.sysdig.com/learn-cloud-native/what-is-headless-cloud-security
5•dariobalinzo•17m ago•0 comments

Claude's Constitution; or love as the solution to the AI alignment problem

https://nintil.com/claude-constitution/
1•surprisetalk•17m ago•0 comments

I tried to put an on-device LLM in an iOS Share Extension. It didn't fit

https://apps.apple.com/ch/app/recipeinbox-rezept-speicher/id6766694174RecipeInbox:RezeptSpeicher
1•MoaMoli•18m ago•0 comments