frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Marginal likelihood is exhaustive leave-p-out cross-validation

https://belko.xyz/posts/lml-and-cross-validation/#marginal_likelihood_is_exhaustive_leave-p-out_c...
1•samuel2•38s ago•0 comments

AI wants direct access to your data

https://matthiasplappert.com/blog/2026/ai-wants-direct-data-access/
1•sherlock_h•2m ago•0 comments

Mythos finds the vulnerabilities. VibeAI makes sure YOU understand them

https://hugonomy.com/
1•GlyphWeaver_a•3m ago•0 comments

Show HN: You can edit the game by chatting with it

https://aion.quest/
1•xkoda•3m ago•0 comments

I build software for small businesses rate my site

https://skiigen.com/
1•loui01•3m ago•1 comments

'A Four-Eyed World' Review: The Story of Spectacles

https://www.wsj.com/arts-culture/books/a-four-eyed-world-review-the-story-of-spectacles-504334ac
1•Hooke•3m ago•0 comments

The Chinese Exclusion Act (PBS Documentary)

https://www.pbs.org/wgbh/americanexperience/films/chinese-exclusion-act/
1•mkgobaco•4m ago•1 comments

The unprecedented and deadly cruise ship hantavirus outbreak

https://arstechnica.com/health/2026/05/everything-you-need-to-know-about-the-hantavirus-cruise-sh...
1•Brajeshwar•6m ago•0 comments

Piccolo: An experimental stackless Lua VM implemented in pure Rust

https://github.com/kyren/piccolo
1•tosh•6m ago•0 comments

Query Insights for Postgres, Powered by ClickHouse

https://clickhouse.com/blog/postgres-query-insights-clickhouse-cloud
1•cauchyk•7m ago•0 comments

Let's kill off half the builtins in 0.8.0

https://c3-lang.org/blog/lets-kill-off-half-the-builtins-in-080/
1•DASD•8m ago•0 comments

Using Rust for Game Development by Catherine West (2018) [video]

https://www.youtube.com/watch?v=aKLntZcp27M
1•tosh•9m ago•0 comments

Worried Britons 'prepping' for major disruption with stash of tins and cash

https://www.theguardian.com/business/2026/may/09/worried-britons-prepping-for-major-disruption-wi...
2•tomwphillips•11m ago•0 comments

The Memex Method

https://pluralistic.net/2021/05/09/the-memex-method/
1•ingve•12m ago•0 comments

AoS and SoA

https://en.wikipedia.org/wiki/AoS_and_SoA
1•tosh•12m ago•0 comments

VGA Memory Access Is Complicated

https://www.os2museum.com/wp/learn-something-old-every-day-part-xxi-vga-memory-access-is-complica...
1•ingve•16m ago•0 comments

Show HN: Durable async jobs for x402-paid APIs

https://github.com/clearedink/cleared-jobs
1•massanishi•16m ago•0 comments

Ask HN: Notify about DNS records propagation

1•vojtechrichter•18m ago•0 comments

Debunking the Myth That Search Is Dying

https://graphite.io/five-percent/debunking-the-myth-that-seo-traffic-has-dramatically-declined
1•paulpauper•18m ago•2 comments

InMusic and Native Instruments Unite

https://www.inmusicbrands.com/press/inmusic-native/
1•Tomte•19m ago•0 comments

A $15 RISC-V Device Built Its Own Wallet and Learned to Pay the Internet

https://www.eddieoz.com/how-a-15-risc-v-device-built-its-own-lightning-wallet-and-learned-to-pay-...
1•eddieoz•20m ago•0 comments

The Body as a Bioreactor

https://accelerateadvancedtherapies.com/thebodyasbioreactor/ep1/
1•CuriousSoup•20m ago•0 comments

Why Americans pay for unfinished electricity projects

https://www.reuters.com/business/energy/why-millions-americans-pay-unfinished-electricity-project...
1•deadbishop•25m ago•0 comments

Becoming competitive when joining a new company

https://ludwigabap.com/posts/on-becoming-competitive-when-joining-a-new-company/
1•bkjlblh•25m ago•0 comments

JHarmonizer: Java-source reordering and formatting for CI

https://github.com/lemon-ant/JHarmonizer
1•antonlem•28m ago•0 comments

Go Players Disempower Themselves to AI

https://www.lesswrong.com/posts/nR3DkyivzF4ve97oM/how-go-players-disempower-themselves-to-ai
2•momentmaker•29m ago•0 comments

He Couldn't Land a Job Interview. Was AI to Blame?

https://www.wired.com/story/he-couldnt-land-a-job-interview-was-ai-to-blame/
1•momentmaker•30m ago•0 comments

Terry Tao – New Mathematical Workflows – Future of Mathematics Symposium

https://www.youtube.com/watch?v=tN4hsT5t0nw
2•fuglede_•32m ago•0 comments

How to survive the information crisis: 'Now reality itself feels fake'

https://www.theguardian.com/media/ng-interactive/2026/may/06/how-to-survive-the-information-crisi...
1•mitchbob•33m ago•0 comments

AI doesn't know – it guesses. What if meaning lived outside the model?

https://github.com/pekkalepola/colibri-clf
2•PekkaLepola•33m ago•0 comments