frontpage.
newsnewestaskshowjobs

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

You and the Atom Bomb – George Orwell (1945)

https://www.orwellfoundation.com/the-orwell-foundation/orwell/essays-and-other-works/you-and-the-...
1•sram1337•35s ago•0 comments

Ghidra + CBMC = Assembly Model Checker

https://www.philipzucker.com/asmc_cpp/
1•matt_d•1m ago•0 comments

Show HN: Sphinx – a hook that quizzes you on your AI agent's code before push

https://sphinx-six-theta.vercel.app/
1•critiquebrowser•5m ago•0 comments

Association between handgrip strength and incident depression

https://www.sciencedirect.com/science/article/pii/S0022395626000968
1•geox•9m ago•0 comments

Life Ratings of Young Adults Down 20 Points Since 2010

https://news.gallup.com/poll/715010/life-ratings-young-adults-down-points-2010.aspx
1•bushwart•13m ago•0 comments

My AI agent caught most of our sites saying sent while no email left the server

https://iampneuma.com/the-function-returned-true/
2•mrshanebarron•32m ago•0 comments

Build architecture diagrams by making a Factorio factory

https://github.com/echohack/factory
1•echohack5•33m ago•1 comments

Show HN: 500 clocks in one 6.3 MB HTML file by Opus 5.5

https://tkgally.github.io/500-clocks/
1•tkgally•34m ago•0 comments

A Coming Incident Crisis?

https://www.philvenables.com/post/a-coming-incident-crisis
2•fagnerbrack•38m ago•0 comments

OpenPrinter

https://www.crowdsupply.com/open-tools/openprinter
2•xjia•42m ago•0 comments

AutoTrust's HF models are trending thanks to farmed likes

https://www.reddit.com/r/LocalLLaMA/comments/1x8sq4z
1•mrfakename•45m ago•0 comments

Phishing emails are baiting your AI assistant

https://www.malwarebytes.com/blog/ai/2026/10/phishing-emails-are-baiting-your-ai-assistant
2•cdrnsf•46m ago•0 comments

The ovary doesn't retire after menopause

https://news.northwestern.edu/stories/2026/10/the-ovary-doesnt-retire-after-menopause?fj=1&utm_so...
2•gmays•51m ago•0 comments

MonkeyITM – open-source broker that sits between agents and the open world

https://github.com/o87enterprises-ai/MonkeyITM
1•o87Dev•54m ago•0 comments

The Renaissance woman who was the first female painter of erotic nudes

https://www.bbc.com/culture/article/20261015-the-trailblazing-erotic-art-of-lavinia-fontana
2•koolhead17•55m ago•0 comments

Millions exposed to spyware operation through online ads, researchers say

https://www.politico.eu/article/israel-firm-advertising-spyware-mobile-phone-hacking/
3•everybodyknows•1h ago•1 comments

What type of mathematician are you?

https://lionellevine.github.io/quiz-what-type-of-mathematician-are-you/
2•sashank_1509•1h ago•0 comments

Turn your coding-agent sessions into private evals

https://github.com/ibragim-bad/evals-from-sessions
2•EvgeniyZh•1h ago•0 comments

Netocracy

https://en.wikipedia.org/wiki/Netocracy
3•henry700•1h ago•0 comments

How the Elizabeth Holmes Doc 'You Can See Everything' Is Deceiving You

https://www.readtheprofile.com/p/elizabeth-holmes-documentary-you-can-see-everything
6•MaysonL•1h ago•0 comments

Starting a New Journal

https://terrytao.wordpress.com/2026/10/17/starting-a-new-journal/
5•smilelamp•1h ago•0 comments

Falsehoods programmers believe about invoices

https://dev.cordhq.app/dev-blog/en/falsehoods-programmers-believe-about-invoices
5•andrevallee•1h ago•1 comments

Hugging Face Pricing 2026: Complete Cost Guide (Free Tier and Paid Plans)

https://www.metacto.com/blogs/the-true-cost-of-hugging-face-a-guide-to-pricing-and-integration
1•peter_d_sherman•1h ago•0 comments

Did Nintendo Kill Switch Emulation? The State of Yuzu, Ryujinx, and Their Forks

https://boilingsteam.com/did-nintendo-kill-switch-emulation-the-state-of-yuzu-ryujinx-and-their-f...
1•ekianjo•1h ago•0 comments

Training and Deploying Production Cyber Monitors on Kimi K3

https://www.goodfire.com/research/production-cyber-monitors-on-kimi-k3
1•a_w•1h ago•0 comments

Ask HN: How can we stop UX people from changing UIs to get promotions?

3•ex-aws-dude•1h ago•0 comments

Who Wants to Live Forever

https://ksetiya.substack.com/p/who-wants-to-live-forever
2•andsoitis•1h ago•0 comments

Defer, Panic, and Recover – The Go Blog

https://go.dev/blog/defer-panic-and-recover
3•doodlesdev•1h ago•0 comments

Making an 88x31 book-button using ImageMagick

https://k.sosnierz.me/08-11-24/
4•DanielVZ•1h ago•1 comments

When will we have flying cars? (2022)

https://www.popsci.com/aviation/history-of-flying-cars/
2•gmays•1h ago•0 comments