frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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

Iceland Finance Ministry says costs of own currency outweigh benefits

https://cryptobriefing.com/iceland-krona-costs-outweigh-benefits/
1•TMWNN•1m ago•0 comments

Gather. an invite-only events board for close groups

https://zuccigather.com/welcome
1•zuccidevs•2m ago•0 comments

Codex just found a "workaround" of not having sudo on my PC

https://twitter.com/i/status/2060746160558543217
2•thunderbong•2m ago•0 comments

Felix86 26.06: Some Gaming

https://felix86.com/felix86-26-06/
1•camel-cdr•4m ago•0 comments

Singing Telegram

https://en.wikipedia.org/wiki/Singing_telegram
1•aragonite•5m ago•0 comments

Remember when people said open video codecs would never win? – OSnews

https://www.osnews.com/story/145160/remember-when-people-said-open-video-codecs-would-never-win/
1•abdelhousni•5m ago•0 comments

Kiki – a tiny homepage construction kit with a small footprint

https://tomotama.com/kiki
1•tobr•5m ago•0 comments

The status quo should be fluent

https://www.leadinginproduct.com/p/status-quo-fluent
1•benkan•8m ago•0 comments

Renewable energy is overtaking traditional power projects across Africa

https://apnews.com/article/solar-battery-renewable-africa-hydro-6bdcc8449fd19fe0108eac827e0bd170
1•benkan•8m ago•0 comments

AI agents get their own phone directory built atop DNS

https://www.theregister.com/ai-ml/2026/05/28/ai-agents-get-their-own-phone-directory-built-atop-d...
1•benkan•9m ago•0 comments

Why Julia's GPU Accelerated Ode Solvers Are 20x-100x Faster Than Jax and PyTorch

https://www.stochasticlifestyle.com/why-julias-gpu-accelerated-ode-solvers-are-20x-100x-faster-th...
2•leephillips•11m ago•0 comments

Open Source Is Free as in Baby (2014)

https://danielcompton.net/dependencies
1•Tomte•11m ago•0 comments

Hal Abelson and Gerald Sussman (RacketCon 2024) [video]

https://www.youtube.com/watch?v=_2qXIDO-cWw
1•tosh•13m ago•0 comments

RIS-Kernel: Running 64k context LLMs on CPU via sparse attention

https://github.com/santosardr/riskernel
1•santosardr•15m ago•0 comments

Are 'mind children' the future of reproduction?

https://www.theguardian.com/books/2026/may/31/are-mind-children-the-future-of-reproduction
2•mitchbob•16m ago•0 comments

Chomsky['s theory of syntax] was wrong. They taught me a lie [video]

https://www.youtube.com/watch?v=w9ahdAH5OOA
1•citadel_melon•17m ago•1 comments

Show HN: Streambed – Stream Postgres to Iceberg on S3, Supports Postgres Wire

https://github.com/viggy28/streambed
1•vira28•17m ago•0 comments

The Bobafication of Manhattan's Chinatown

https://nextcity.org/features/the-bobafication-of-manhattans-chinatown
2•devy•22m ago•0 comments

Guidelines for Respectful Use of AI

https://www.elidedbranches.com/
1•ruds•25m ago•0 comments

Preference Falsification

https://en.wikipedia.org/wiki/Preference_falsification
1•Kye•25m ago•0 comments

Fixing JavaScript observability, one library at a time

https://blog.sentry.io/fixing-javascript-observability/
2•awad_dev•27m ago•0 comments

Words of Type

https://wiki.wordsoftype.com/
1•tobr•32m ago•0 comments

Typeface Specimens of Houston Mono

https://arslan.io/2026/05/31/typeface-specimens-of-houston-monotm/
3•farslan•35m ago•0 comments

Creatine for the Treatment of Depression (2019)

https://pmc.ncbi.nlm.nih.gov/articles/PMC6769464/
4•bookofjoe•37m ago•0 comments

Open-source spectre haunts the AI feast

https://www.reuters.com/commentary/breakingviews/open-source-spectre-haunts-ai-feast-2026-05-28/
1•1vuio0pswjnm7•37m ago•0 comments

The math world is losing its mind over the new AI solution to an Erdős problem

https://www.wsj.com/tech/ai/ai-math-solves-erdos-problem-openai-c4029e84
2•fortran77•37m ago•2 comments

Going to Dinner

https://medium.com/@royrapoport/going-to-dinner-78c76a635719
1•mooreds•39m ago•0 comments

How to Tell If You're Being Manipulated – 6 Tactics Used on You Every Day

https://stvrrll1ght.substack.com/p/how-to-tell-if-youre-being-manipulated
1•maheenahmed•40m ago•0 comments

Skip-Level One-on-Ones

https://mgrebler.substack.com/p/the-secret-to-skip-level-one-on-ones
1•mooreds•40m ago•0 comments

Google SOTA

https://imgur.com/gallery/llDaUDr
3•johnbarron•42m ago•1 comments