frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

10x Faster Real-Time High-Quality AI Video Generation

https://tenstorrent.com/solutions/real-time-video
1•montyanderson•36s ago•0 comments

LLM Summaries Are Ruining Your Learning

https://arpitbhayani.me/blogs/do-not-rely-on-summaries/
1•menonNN•1m ago•0 comments

AI and the Future of News 2026

https://reutersinstitute.politics.ox.ac.uk/news/ai-and-future-news-2026-what-we-learnt-about-its-...
1•jruohonen•2m ago•0 comments

What do you think of people buying Mac mini's to run AI?

1•namegulf•10m ago•0 comments

Task-Specific LLM Evals That Do and Don't Work

https://eugeneyan.com/writing/evals/
1•eigenBasis•12m ago•0 comments

Mark Zuckerberg Says AI Costs Contributed to Layoffs of 8k Staffers

https://www.forbes.com/sites/antoniopequenoiv/2026/04/30/mark-zuckerberg-says-ai-costs-contribute...
1•ZeidJ•15m ago•0 comments

Workforce Transparency Act [pdf]

https://www.warner.senate.gov/wp-content/uploads/2026/04/Warner.-Budd-Workforce-Transparency-Act.pdf
1•petethomas•15m ago•0 comments

Call centres dismantled and ten arrested in EUR 50 million online fraud case

https://www.europol.europa.eu/media-press/newsroom/news/call-centres-dismantled-and-ten-arrested-...
1•jruohonen•16m ago•0 comments

C8s: A Confidential Kubernetes Architecture

https://arxiv.org/abs/2604.26974
2•badcryptobitch•17m ago•0 comments

Keep your agents updated with latest in your libraries

https://library-skills.io/
1•ankitg12•18m ago•0 comments

Ask HN: In the age of AI do we need to learn how to code?

1•JasonHEIN•22m ago•0 comments

OpenAtom Foundation

https://en.wikipedia.org/wiki/OpenAtom_Foundation
1•gfalcao•23m ago•0 comments

Product market fit isn't a stage, it's a gauntlet

https://jonno.nz/posts/product-market-fit-is-a-gauntlet/
1•halger•24m ago•0 comments

Dividing 1 by 998,001 Yields a Very Strange Decimal

https://brilliantlearning.in/dividing-1-by-998001-yields-a-very-strange-decimal/
3•thunderbong•26m ago•0 comments

AWS Will Be an OEM, Just Like Google and Maybe Microsoft

https://www.nextplatform.com/cloud/2026/04/30/aws-will-be-an-oem-just-like-google-and-maybe-micro...
1•rbanffy•28m ago•0 comments

PrivClaw – Open-source self-hostable AI plugin marketplace (FastAPI and Next.js)

https://github.com/geneleo537-afk/privclaw
1•GeneLeo•28m ago•0 comments

CLI based issue tracker TUI – distributed and backed by Git

https://github.com/ljtn/epiq
1•tjek•28m ago•0 comments

The Many Forms of Marcel Duchamp

https://www.newyorker.com/magazine/2026/05/04/marcel-duchamp-art-review-moma
1•petethomas•34m ago•0 comments

LLMs Don't Quite Beat Classical Hyperparameter Optimization Algorithms

https://github.com/ferreirafabio/autoresearch-automl
2•achierius•35m ago•2 comments

All the Sad Young Chinese Professionals

https://www.theatlantic.com/international/2026/04/china-loneliness-epidemic/686994/
3•petethomas•37m ago•0 comments

Thoughts on WebAssembly as a Stack Machine

https://eli.thegreenplace.net/2026/thoughts-on-webassembly-as-a-stack-machine/
2•mfrw•37m ago•0 comments

A Dab of DuckDB

https://peterdohertys.website/blog-posts/dab-of-duck.html
2•vismit2000•40m ago•0 comments

Poolr – shared photo albums for events, no app required for guests

https://www.getpoolr.com/
1•SupaMRVL•45m ago•0 comments

Maybe you should learn something

https://www.marginalia.nu/log/a_135_learn/
2•latexr•46m ago•0 comments

Our Wilderness Areas Are in Danger

https://apnews.com/article/mining-moratorium-trump-boundary-waters-permits-3d32cd0f591e0de0bfa3a8...
2•MrChoke•46m ago•0 comments

Stripe link-CLI: Let your agents spend on your behalf

https://github.com/stripe/link-cli
1•tjek•51m ago•0 comments

Your Biggest Vulnerability is your Shitty Compensation

https://green.spacedino.net/your-biggest-vulnerability-is-your-shitty-compensation/
3•jfil•52m ago•0 comments

H1-X Live Unveiling Event – Future of personal flight [video]

https://www.youtube.com/watch?v=sddOq3h9hNA
1•omer_k•55m ago•0 comments

Don't forget: The plural of anecdote is data

http://blog.danwin.com/don-t-forget-the-plural-of-anecdote-is-data/
1•aesthesia•58m ago•0 comments

Apple's lobbying effort saves it from new App Store rules

https://appleinsider.com/articles/26/04/27/apples-massive-lobbying-effort-saves-it-from-new-app-s...
4•latexr•1h ago•0 comments