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

Chaoskampf

https://en.wikipedia.org/wiki/Chaoskampf
1•thunderbong•1m ago•0 comments

’Abhorrent’: the inside story of the Polymarket gamblers betting millions on war

https://www.theguardian.com/business/2026/apr/11/polymarket-gamblers-betting-iran-war-ukraine-new...
1•sandebert•1m ago•0 comments

Codex GUI's spinner uses 70% of GPU

https://github.com/openai/codex/issues/16857
1•Einenlum•3m ago•0 comments

Meta is set to pay its top AI executives almost a billion each in bonuses

https://www.msn.com/en-my/news/other/meta-is-set-to-pay-its-top-ai-executives-almost-a-billion-ea...
1•seekdeep•4m ago•0 comments

Škoda Duobell bike bell pierces noise-cancelling headphones

https://www.dezeen.com/2026/04/09/skoda-duobell-bike-bell-noise-cancelling-headphones/
1•trauco•7m ago•0 comments

US intelligence indicates China is preparing weapons shipment to Iran

https://www.cnn.com/2026/04/11/politics/us-intelligence-iran-china-weapons
1•OutOfHere•7m ago•0 comments

Japan's cabinet approved a bill classifying crypto as a financial instrument

https://www.ccn.com/news/crypto/japan-classifies-crypto-financial-instrument-historic-shift/
1•giuliomagnifico•9m ago•0 comments

Show HN: Bunqueue – Saga workflow engine for Bun with embedded SQLite

https://bunqueue.dev/guide/workflow/
1•kernelvoid•10m ago•0 comments

Hungary Is a Laboratory for Illiberal Nationalism. The Results Are In

https://www.cato.org/commentary/hungary-laboratory-illiberal-nationalism-results-are
1•rwmj•11m ago•0 comments

Show HN: I rebuilt a 2000s browser strategy game on Cloudflare's edge

https://kampfinsel.com/
1•parzivalt•11m ago•0 comments

I built a pure WGSL LLM engine to run Llama on my Snapdragon laptop GPU

https://github.com/Beledarian/wgpu-llm
1•Beledarian•13m ago•1 comments

Scaling Managed Agents: Decoupling the brain from the hands

https://www.anthropic.com/engineering/managed-agents
1•jbredeche•17m ago•0 comments

Keyboards

https://mastodon.social/@keyboards
1•doener•18m ago•0 comments

Designing a Programming Language Around Korean's SOV Grammar Instead Of

https://github.com/wwoosshh/geul-lang/releases/tag/v0.7.1
2•birdculture•20m ago•0 comments

Hungarian government creds left in the safe hands of 'FrankLampard'

https://www.theregister.com/2026/04/11/hungary_government_logins_breach/
3•Brajeshwar•22m ago•0 comments

Plastic Pollution Is Bad Enough. Burning It Can Be Worse

https://undark.org/2026/04/10/burning-plastic-pollution-indonesia/
1•cocothem•23m ago•0 comments

Project Zomboid: Patching a Zero Day Exploit

https://store.steampowered.com/news/app/108600/view/494973688019419974
1•uyzstvqs•26m ago•0 comments

PSA Crypto: The P is for Portability

https://danielmangum.com/posts/psa-crypto-portability/
2•hasheddan•28m ago•0 comments

MRRescue

https://www.mrrescue.pro/
2•donihernandez•30m ago•0 comments

AI Datacenters Are Becoming Strategic Targets

https://members.sigmazero.cc/posts/155180337
3•sigmazero•30m ago•0 comments

Turning Chinese Character Structure into a Strategy Game

https://store.steampowered.com/app/4218330/WordJoy/
2•PaulHoule•35m ago•0 comments

Configuration flags are where software goes to rot

https://00f.net/2026/04/11/config-flags/
2•jedisct1•38m ago•0 comments

We Built Every Employee at Ramp Their Own AI Coworker

https://twitter.com/sebgoddijn/status/2042285915435937816
3•lsowen•41m ago•1 comments

Why I'm Quitting Physics (and moving to AI) [video]

https://www.youtube.com/watch?v=iz7sCKbW8KM
2•amelius•44m ago•0 comments

Researchers used AI to analyze 400k Reddit posts, revealing GLP-1 side effects

https://www.seas.upenn.edu/stories/penn-researchers-use-ai-to-surface-unreported-glp-1-side-effec...
2•giuliomagnifico•47m ago•0 comments

The Miracle and Mystery of Artemis II

https://washingtonmonthly.com/2026/04/10/the-miracle-and-mystery-of-artemis-ii/
1•hkhn•51m ago•0 comments

AI 2027 Tracker

https://ai2027tracker.com/
1•frozenseven•52m ago•0 comments

Artemis II crew 'happy and healthy' after completing historic mission to Moon

https://www.bbc.com/news/live/c3dlnzv5r71t
1•hkhn•53m ago•0 comments

An Introduction to Obsidian

https://bryanhogan.com/blog/obsidian-introduction
1•bryanhogan•54m ago•0 comments

I Printed a Microchip That Runs on Air [video]

https://www.youtube.com/watch?v=QJdBp5dGrww
1•ggeorgovassilis•55m ago•0 comments