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

Visual Lean: An experimental graphical user interface for writing Lean code

https://leangame.autumnofautumn.com/
1•Luc•2m ago•0 comments

Ask HN: What should I do with 50k verified emails

1•zerodollar•5m ago•0 comments

Big Tech Will Not Broadcast Your Dissent

https://www.motherjones.com/politics/2026/10/meta-x-no-kings-elections-protests-midterms-free-spe...
1•robtherobber•7m ago•0 comments

SaaS Development Outsourcing: 20 Questions to Ask Before You Sign

https://www.technology.org/2026/09/30/saas-development-outsourcing-20-questions-to-ask-before-you...
1•Aninay•9m ago•0 comments

Nordstjernen Web Browser

https://nordstjernen.org/
1•edward•9m ago•0 comments

JEP 543: Structured Concurrency (Java 28)

https://openjdk.org/jeps/543
2•lichtenberger•11m ago•0 comments

Anthropic disclosed an $80.7B net loss for the first half of 2026

https://www.wsj.com/tech/ai/anthropic-revenue-growth-ipo-accaf0f1
1•joennlae•12m ago•0 comments

Is Hacker News still a good predictor of tech trends?

https://installmap.com/research/hacker-news-lead-over-google
1•markusweber97•12m ago•0 comments

AI video effects from one or two photos, without writing prompts

https://aieffectstudio.com/
1•visiohex•12m ago•0 comments

Signs your software project needs rescuing – not another sprint

https://businesscloud.co.uk/opinion/signs-your-software-project-needs-rescuing-not-another-sprint/
1•Aninay•14m ago•0 comments

Did Satoshi Get Bitcoin Wrong? Claude's NSA Discovery Sparks Debate

https://tech.yahoo.com/ai/claude/articles/did-satoshi-bitcoin-wrong-claudes-123000042.html
1•cybermango•15m ago•0 comments

ByteDance, Alibaba, Tencent place over $35B worth of Nvidia chip orders

https://www.reuters.com/business/retail-consumer/bytedance-alibaba-tencent-place-over-35-billion-...
1•giuliomagnifico•16m ago•0 comments

Claude Code Spotted a Cryptominer on Mac While Building a Temperature App

https://www.gadgetreview.com/claude-code-spotted-a-cryptominer-on-mac-while-helping-to-build-a-te...
2•cybermango•16m ago•0 comments

Learning by building a multi-agent design lab. Yet, single agent works better

https://github.com/bencodev/dsgnrd
2•benoit_cotte•19m ago•0 comments

Finland Buying a Million Landmines

https://yle.fi/a/74-20252139
1•vrganj•20m ago•0 comments

Programming by hand is fun but it's better to not have to do it any more

https://twitter.com/GruPiotr/status/2112825278397341710
2•piotrgrudzien•23m ago•0 comments

European personal agent for knowledge workers

https://usebris.com/
2•emilsmeznieks•23m ago•0 comments

Guy made a site to spot SLOP games on NEXT FEST – it is vibe coded

https://www.reddit.com/r/IndieDev/comments/1xbgnwh/im_building_a_site_that_lets_you_filter_next_f...
2•ibackstrom•25m ago•0 comments

PolicyWatcher – Independent monitor of privacy, ToS and AI policy changes

https://policywatcher.online
1•a9i•27m ago•0 comments

Parallelizing MySQL Snapshots

https://materialize.com/blog/parallelizing-mysql-snapshots/
1•def-•28m ago•0 comments

We Replaced Fyxer Overnight

https://madewithlove.com/blog/how-we-replaced-fyxer-overnight/
1•andreascreten•35m ago•2 comments

Predicting cancer survival using face photographs

https://www.thelancet.com/journals/landig/article/PIIS2589-7500(26)00079-8/fulltext
1•fabianlindfors•35m ago•0 comments

File Attack Deep Dives: Office Documents as an Attack Surface

https://mohitkhare.com/blog/file-attack-document-macros/
3•mkfeuhrer•37m ago•0 comments

Spread: Launch faster. Break nothing. Know why

https://www.spread.ai
1•doener•37m ago•0 comments

Battle Drones–a vibe coded RTS with audio-based multiplayer

https://simonwillison.net/2026/Oct/20/battledrones/
1•red369•39m ago•0 comments

Zoomies.sh

https://zoomies.sh/
2•jnnngs•43m ago•0 comments

Ahead-of-Time Compilation of JavaScript to WebAssembly via Static Type Inference [video]

https://vimeo.com/1234257957
1•Klaster_1•45m ago•0 comments

A Bicycle Journey Across Brazil to Find a Vanishing Savanna

https://e360.yale.edu/features/2026-film-contest-second-place-cerrado
2•throwaway2037•45m ago•0 comments

Ask HN: What's a good RSS feed reader?

2•karimmaassen•51m ago•0 comments

Manufacturing Nostalgia: Paula Sweeney on Longing for How Life Once Felt

https://philosophybreak.com/articles/manufacturing-nostalgia-paula-sweeney-on-longing-for-how-lif...
1•robtherobber•51m ago•0 comments