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

Sam Altman and Elon Musk Sure Dislike Each Other

https://www.theatlantic.com/technology/2026/04/openai-trial-elon-musk-sam-altman/686984/
1•voxadam•1m ago•0 comments

Miracle – A Wayland Compositor You Can Script with WebAssembly

https://github.com/miracle-wm-org/miracle-wm
1•matthewkosarek•1m ago•0 comments

Functional Programmers need to take a look at Zig

https://pure-systems.org/posts/2026-04-29-functional-programmers-need-to-take-a-look-at-zig.html
1•doyougnu•1m ago•0 comments

UK government says 100 countries have spyware that can hack people's phones

https://techcrunch.com/2026/04/22/uk-government-says-100-countries-have-spyware-that-can-hack-peo...
1•speckx•2m ago•0 comments

Anthropic bug causes $200 extra charge, refuses refund

https://github.com/anthropics/claude-code/issues/53262
3•homebrewer•4m ago•0 comments

LLMs understand flavours without ever tasting anything

https://arxiv.org/abs/2604.22776
1•josefchen•4m ago•0 comments

CipherTax – Safely use AI for tax filing by redacting PII locally

https://github.com/z26zheng/CipherTax
1•z26zheng•6m ago•0 comments

Lua-Ification of Hyprland Configs

https://hypr.land/news/26_lua/
2•paranoidxprod•7m ago•0 comments

A Path Not Taken for OxCaml

https://joel.place/blog/path-not-taken/
1•salted-cacao•8m ago•0 comments

"Slow Metabolism" May Help Explain High Dieting Failure Rates

https://greyenlightenment.com/2026/04/26/slow-metabolism-may-help-explain-high-dieting-failure-ra...
1•paulpauper•8m ago•0 comments

PS5 Linux loader goes public, turning console into full Linux gaming PC

https://www.tomshardware.com/software/linux/ps5-linux-loadr-goes-public-turning-phat-consoles-int...
1•akyuu•9m ago•0 comments

We Built Something That Didn't Exist. Today, We're Sharing It with the World

https://lovelace.ai/articles/we-built-something-that-didnt-exist-today-were-sharing-it-with-the-w...
1•trelane•10m ago•0 comments

FCC orders review of ABC licenses after Kimmel joke offends Trump and First Lady

https://arstechnica.com/tech-policy/2026/04/fcc-orders-review-of-abc-licenses-after-kimmel-joke-o...
4•SilverElfin•15m ago•1 comments

The State of Stablecoin Infrastructure (Dashboard)

https://stablescape.xyz/
1•sevenfoldnancy•15m ago•0 comments

They train LLM only with data up to 1930 and it still solves Python problems

https://www.theregister.com/2026/04/28/vintage_chatbot_lives_in_past/
1•Multipassionate•15m ago•0 comments

Laguna XS.2: A Coding Model Built for Closed Environments, Now Open Weights

https://firethering.com/laguna-xs2-poolside-open-source-coding-model/
1•steveharing1•18m ago•0 comments

Agents are not compute – agents are data

https://electric.ax/blog/2026/04/29/introducing-electric-agents
3•lirbank•19m ago•1 comments

Show HN: Quldra – A true device based post quantum messenger

https://quldra.com/
2•xMKx•19m ago•1 comments

Two Heads Are Better Than One: Async Knowledge Injection for Speech AI

https://pub.sakana.ai/kame/
1•pr337h4m•20m ago•0 comments

Show HN: GitGres – A private GitHub in 650 lines of PostgreSQL

https://github.com/calebwin/gitgres
1•calebhwin•20m ago•0 comments

I made Common Crawl's 4.4B edges queryable for backlink lookups

https://crawlgraph.com
1•pucilpet•21m ago•0 comments

Apple Has Given Up on the Vision Pro After M5 Refresh Flop

https://www.macrumors.com/2026/04/29/apple-vision-pro-m5-flop/
3•jurmous•22m ago•0 comments

Treetable

https://web.archive.org/web/20170706192858/https://archive.vector.org.uk/art10500340
1•tosh•23m ago•0 comments

Unfounded Health Concerns Are Powering a Solar Backlash

https://www.propublica.org/article/michigan-solar-farms-health-concerns-st-clair-county
1•jonah•24m ago•0 comments

One Developer, Two Dozen Agents, Zero Alignment

https://maggieappleton.com/zero-alignment
1•romac•27m ago•0 comments

3D Filament Price Tracker

https://filamentpricetracker.com/
1•layershiftk•28m ago•0 comments

OpenAI DevDay 2026

https://openai.com/index/devday-2026/
1•alach11•28m ago•0 comments

Chromium window restoration fixed on macOS

https://issues.chromium.org/issues/369865047
1•ljoshua•28m ago•0 comments

NOEM: Finite element method enabled by reusable neural operators

https://www.nature.com/articles/s43588-026-00974-2
1•brandonb•29m ago•0 comments

How Many Frames per Second Do You Need?

https://hooby.blog/posts/how-many-frames-per-second-do-you-need/
1•speckx•31m ago•0 comments