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

Maryland Senators Approve Bill to Let Off-Duty Firefighters, EMTs Use Cannabis

https://www.marijuanamoment.net/maryland-senators-approve-bill-to-let-firefighters-and-rescue-wor...
1•treatsmokenjury•40s ago•0 comments

Zed will require age identification for its services

https://zed.dev/terms#21-eligibility
1•delduca•1m ago•0 comments

Linux in Space: The aerospace industry's attitude for Space Architechture

https://www.windriver.com/blog/Linux-Flies-into-Space
1•huxleyFiddler•2m ago•1 comments

The magic of adding random noise to black and white images [video]

https://www.youtube.com/watch?v=kT4p1GXq4HY
1•ColinWright•2m ago•0 comments

Who Pays for Tariffs Along the Supply Chain? Evidence from European Wine Tariffs

https://www.nber.org/papers/w34392
1•Anon84•3m ago•0 comments

Are these AI cost‑curve assumptions realistic? (ARK Big Ideas 2026)

https://www.ark-invest.com/big-ideas-2026
1•crosbyk•3m ago•1 comments

Why specialized AI systems may outperform general‑purpose models

https://research.contrary.com/report/the-case-for-specialized-ai
1•crosbyk•5m ago•1 comments

Generating Colour Palettes Thanks to Microgpt

https://fungiboletus.github.io/MicroColourGPT3000/generating-colour-palettes-randomly.html
1•speedgoose•7m ago•0 comments

Economic Possibilities for our Grandchildren (1930) [pdf]

http://www.econ.yale.edu/smith/econ116a/keynes1.pdf
1•mooreds•8m ago•0 comments

Planning Center is the newest Rails Foundation Contributing member

https://rubyonrails.org/2026/3/3/planning-center-newest-contributing-member
2•bgrainger•9m ago•1 comments

Lazarus 4.6

https://forum.lazarus.freepascal.org/index.php?topic=73549.0
1•nicoloren•9m ago•0 comments

Podcasts Lead AM/FM in Spoken-Word Listening, Marking a First

https://www.edisonresearch.com/podcasts-lead-am-fm-in-spoken-word-listening-marking-a-first/
2•bookofjoe•11m ago•0 comments

Verification of Stochastic Systems: Guarantees in the Presence of Uncertainty

https://books.radbouduniversitypress.nl/index.php/rup/catalog/book/Robust-Verification-Stochastic...
1•measurablefunc•11m ago•0 comments

YC Save the Ducks Jacket

1•Invierno•11m ago•0 comments

Claims about gender, behavior fall apart when samples are ethnically diverse

https://www.psypost.org/broad-claims-about-gender-and-behavior-fall-apart-when-studies-include-et...
2•ZunarJ5•12m ago•0 comments

Downdetector, Speedtest sold to IT service provider Accenture in $1.2B deal

https://arstechnica.com/information-technology/2026/03/downdetector-speedtest-sold-to-it-service-...
2•geephroh•12m ago•0 comments

Show HN: BlokJS – No VDOM, no build reactive UI framework (~9KB gzipped)

https://maleta.github.io/blokjs/docs/
1•maleta•13m ago•0 comments

Software Can Be Finished

https://rosswintle.uk/2025/10/software-can-be-finished/
3•latexr•13m ago•0 comments

Pillars of BoringOps

https://boringops.sh/pillars/
1•donutshop•13m ago•0 comments

Show HN: Bearprompt – Privacy-first prompt library that runs in the browser

https://bearprompt.com/
1•yaman071•14m ago•0 comments

Fitted sheet update: Unfolding a professionally folded fitted sheet

https://ratfactor.com/cards/fitted-sheets-pro-unfold
1•ibobev•15m ago•0 comments

Bifrost Now Works with MCP

https://docs.getbifrost.ai/quickstart/gateway/setting-up-auth
1•aanthonymax•15m ago•0 comments

Ori Mnemos – an open-source persistent memory for AI agents

https://github.com/aayoawoyemi/Ori-Mnemos
1•starro____•17m ago•1 comments

Show HN: Endgame – Production-aware ML under the sklearn API

1•cameronhamilton•17m ago•0 comments

OnWatch – Track 6 AI API quotas from your terminal (<50MB RAM, zero telemetry)

1•prakersh•18m ago•0 comments

The Lobster Programming Language

https://strlen.com/lobster/
1•keyle•19m ago•0 comments

Don't Make Me Talk to Your Chatbot

https://raymyers.org/post/dont-make-me-talk-to-your-chatbot/
8•pkilgore•20m ago•0 comments

Schools in England sidelining dressing-up for World Book Day, MPs hear

https://www.theguardian.com/education/2026/mar/03/schools-england-dressing-up-world-book-day-mps-
1•zeristor•21m ago•0 comments

Strikes on Amazon data centers highlight vulnerability to physical disasters

https://apnews.com/article/amazon-aws-data-center-uae-iran-bahrain-71066b0a822c4cfd88b61e3fe79af917
3•the_arun•22m ago•1 comments

IKEA deploys mini robot trucks in China for in-store fulfillment

https://www.freightwaves.com/news/ikea-deploys-mini-robot-trucks-in-china-for-in-store-fulfillment
4•crescit_eundo•23m ago•0 comments