frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Learning from Structure: Discord's Entity-Relationship Embeddings

https://discord.com/blog/learning-from-structure-discords-entity-relationship-embeddings
1•throwaway314155•2m ago•0 comments

An Elephant Is Blind Without the Hairs on Its Trunk

https://www.nytimes.com/2026/02/12/science/elephant-whiskers.html
1•bookofjoe•3m ago•1 comments

RFC Explorer – Explore over 9000 RFCs

https://rfcexplorer.net/
1•xillb•3m ago•0 comments

We Need to Stop Asking "Is This Better Than That"

https://doppelgangerdev.com/docs/software-isn-t-a-competition-it-s-a-map-of-our-frustrations
1•asernasr•7m ago•1 comments

Show HN: Built a news aggregator that collect AI news around the world

https://vvsearch.com/workspace/news-terminal
1•raugen•11m ago•0 comments

Will artificial snow save the ski industry in the long run, or curse it?

https://theconversation.com/will-artificial-snow-save-the-ski-industry-in-the-long-run-or-curse-i...
1•PaulHoule•11m ago•0 comments

Finding 100 Kernel Bugs Using Agent Swarms

https://ydinkin.substack.com/p/200-kernel-bugs-in-30-days
1•itkeman•12m ago•0 comments

Show HN: I made a 4D version of DOOM

https://hyperhell.itch.io/hyperhell
1•chronolitus•12m ago•0 comments

Tim Cook Warned by CIA That China Could Move on Taiwan by 2027

https://www.macrumors.com/2026/02/24/tim-cook-warned-by-cia-china-taiwan-2027/
3•mgh2•14m ago•1 comments

Show HN: Declare AI – open standard for AI content disclosure

https://declare-ai.github.io/declare-ai/declare-ai-devteam.html
1•BetterToBest•14m ago•1 comments

Apple Set a European iPhone Sales Record Last Year

https://www.macrumors.com/2026/02/24/apple-european-iphone-sales-record-2025/
1•mgh2•14m ago•0 comments

Show HN: Limits – Control layer for AI agents that take real actions

https://limits.dev
6•thesvp•14m ago•0 comments

Build a free job-winning resume and cover letter in minutes

https://resumecv.pro
1•pivlu•17m ago•1 comments

Data center outlook: half of 2026 pipeline may not materialize

https://www.sightlineclimate.com/research/data-center-outlook
1•toomuchtodo•19m ago•0 comments

Western Digital Sold Out All 2026 Hard Drive Production as AI Centers Scramble

https://247wallst.com/investing/2026/02/18/western-digital-sold-out-all-2026-hard-drive-productio...
1•vmg12•19m ago•0 comments

Being a Luddite Is Cool, but Have You Seen the Tapestries New Looms Are Making?

https://www.mcsweeneys.net/articles/being-a-luddite-is-cool-and-all-but-have-you-seen-the-hilario...
1•stmw•23m ago•0 comments

Show HN: Claude Automation Toolkit – 6 Python scripts for AI task automation

https://github.com/indoor47/summarize-docs
1•adamrunboy•24m ago•0 comments

The Weapons of Stargate [video]

https://www.youtube.com/watch?v=gMt6pzC_0dI
2•Kye•29m ago•0 comments

Capybara: A Unified Visual Creation Model

https://github.com/xgen-universe/Capybara
2•modinfo•30m ago•1 comments

secrets

https://github.com/umputun/secrets
1•indigodaddy•30m ago•0 comments

Programming is dead: a letter to junior and mid-level engineers

https://medium.com/@dbounds/programming-is-dead-a-letter-to-junior-and-mid-level-engineers-5b630f...
4•RobSpectre•30m ago•1 comments

Intelligence Yield: Efficiency of Frontier Models on METR Tasks

https://bmdragos.github.io/intelligence-yield/
2•gnopercept•32m ago•1 comments

Show HN: NeoShift BI – Build AI-analyzed data dashboards in minutes

2•DonWono•32m ago•0 comments

Show HN: The Agentic Workflow Engine That Lives Inside Your App

https://stabilize.rodmena.ai
2•rodmena•33m ago•0 comments

Persistent Prompts and Built in Search

2•lazybusy•34m ago•0 comments

New Claude Code Feature "Remote Control"

2•rob•35m ago•0 comments

What's Going on with the Price of Gold

https://www.bbc.com/news/articles/c87r2700dq8o
1•teleforce•35m ago•0 comments

Seedream 5.0 Lite API Pricing Breakdown

2•zaaaaooo•36m ago•0 comments

India AI Summit Decoded

https://twitter.com/twitter/status/2025755341279907976
2•stereoradonc•47m ago•0 comments

Remote Labor Index – Measuring AI Automation of Remote Work [pdf]

https://www.remotelabor.ai/paper.pdf
1•TheWiggles•47m ago•0 comments