frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

AI Slop Detector

https://github.com/QCK-Framework/QCK_SMART_Fractal-Data-Pruning
1•qck-framework•1m ago•0 comments

Chinese EV giant BYD faces 'forced labor' investigation at Hungary factory

https://theworld.org/stories/2026/03/31/chinese-ev-giant-byd-faces-forced-labor-investigation-at-...
1•assimpleaspossi•1m ago•0 comments

Journey of building a PostgreSQL consultancy – a founder's view

https://stormatics.tech/blogs/three-years-of-stormatics-what-building-a-postgresql-consultancy-lo...
4•annieghazali_1•3m ago•0 comments

SpaceX files confidentially for IPO potentially valued at $1.75T

https://techcrunch.com/2026/04/01/spacex-files-confidentially-for-ipo-in-mega-listing-potentially...
1•chakintosh•3m ago•0 comments

Meta and Google face existential threat as nations rush to ban teen users

https://www.latimes.com/business/story/2026-04-01/meta-google-face-existential-threat-as-nations-...
2•1vuio0pswjnm7•4m ago•0 comments

Ubuntu Mate Leader Stepping Down, Seeking New Contributors

https://www.phoronix.com/news/Ubuntu-MATE-Needs-Leader
2•Qem•4m ago•0 comments

The Life-Changing Power of a Book Review Before Algorithms

https://www.nytimes.com/2026/03/24/books/review/larry-mcmurtry-annie-proulx-jeff-bezos-brokeback-...
1•1vuio0pswjnm7•6m ago•0 comments

Show HN: Hacker News, summarized and printed to your local printer

https://github.com/thejchap/jc-news
1•jchap•7m ago•0 comments

Meta Adaptive Ranking Model: Bending the Inference Scaling Curve to Serve Models

https://engineering.fb.com/2026/03/31/ml-applications/meta-adaptive-ranking-model-bending-the-inf...
1•eamag•11m ago•0 comments

A.I. Helped One Man (and His Brother) Build a $1.8B Company

https://www.nytimes.com/2026/04/02/technology/ai-billion-dollar-company-medvi.html
2•jbredeche•12m ago•0 comments

The SpaceX IPO: retail investor notes

https://report.bearblog.dev/the-spacex-ipo-will-be-the-perfect-storm-of-retail-investor-fallacies/
3•u1hcw9nx•12m ago•0 comments

New StackOverflow website looks more like Reddit

https://beta.stackoverflow.com
1•birdculture•13m ago•0 comments

Macron says it is unrealistic to open Hormuz Strait by force

https://www.reuters.com/world/macron-says-it-is-unrealistic-open-hormuz-strait-by-force-2026-04-02/
1•geox•14m ago•0 comments

Gödel's Blockchain Problem: valid but not true

1•tpotts_eth•15m ago•0 comments

Vibe Coding: Best Practices for Prompting

https://supabase.com/blog/vibe-coding-best-practices-for-prompting
1•Bakalemwa•18m ago•0 comments

Lemonade by AMD: a fast and open source local LLM server using GPU and NPU

https://lemonade-server.ai
1•AbuAssar•19m ago•0 comments

Fuel prices are soaring. Plastic could be next

https://www.technologyreview.com/2026/04/02/1135045/plastic-economic-effects/
1•joozio•21m ago•0 comments

Why I'm Building Another AI Meeting Notes Tool Instead of Using Granola.ai

https://www.indiehackers.com/post/why-i-m-building-another-ai-meeting-notes-tool-C3yZAdu9r4DKF2B0...
1•zlat1997•25m ago•2 comments

Spanner Columnar Engine in Preview

https://cloud.google.com/blog/products/databases/spanner-columnar-engine-in-preview
1•fastest963•26m ago•0 comments

Skill Ratings and Matchmaking

https://kalifi.org/2026/02/skill-ratings.html
3•ZacnyLos•26m ago•0 comments

Zstandard Across the Stack

https://oddur.me/posts/zstandard-across-the-stack/
1•oddurmagnusson•31m ago•0 comments

Beyond the Network View: DNS-Driven Application Visibility

https://labs.ripe.net/author/danny-lachos/beyond-the-network-view-dns-driven-application-visibility/
1•jruohonen•33m ago•0 comments

Sweden goes back to basics, swapping screens for books in the classroom

https://undark.org/2026/04/01/sweden-schools-books/
27•novaRom•34m ago•1 comments

Enabling Codex to Analyze Two Decades of Hacker News Data

https://modolap.com/publication/hn-analysis-1
3•ronfriedhaber•41m ago•0 comments

Mix-and-match synthesis of 3D small molecules

https://www.nature.com/articles/d41586-026-00809-0
2•salkahfi•42m ago•0 comments

$200 oil isn't as crazy as it sounds

https://www.cnn.com/2026/04/02/business/price-200-oil-gas-iran
2•dabinat•45m ago•0 comments

Pro-XSLT.js – fast and lightweight JavaScript library implementing XSLT 1.0

https://github.com/hbi99/pro-xslt
1•hbi99•46m ago•0 comments

Half of social-science studies fail replication test in years-long project

https://www.nature.com/articles/d41586-026-00955-5
5•MrBuddyCasino•50m ago•2 comments

Eli Lilly's obesity pill approved by FDA, setting up Novo Nordisk competition

https://www.statnews.com/2026/04/01/eli-lilly-obesity-pill-approved-orforglipron-foundayo/
3•andsoitis•52m ago•0 comments

Ask HN: Has anyone became successful on their own?

5•Nair0•59m ago•6 comments