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

Indian telecom operator Reliance sabotages Telegram access outside India

https://twitter.com/durov/status/2066945969854234977
1•aayushdutt•6m ago•0 comments

Show HN: SciFigureAI – AI figure maker for research papers

https://scifigureai.com
1•jiangyifeng•8m ago•0 comments

ZFSBootMenu

https://zfsbootmenu.org
1•porjo•10m ago•0 comments

Headroom

https://github.com/chopratejas/headroom
1•marc__1•11m ago•0 comments

Helios: Turn Code into Video

https://www.heliosrender.com
1•wahnfrieden•14m ago•0 comments

Upgrading My Git Embedding Program for Zig 0.16

https://louislefebvre.net/tech/zig-upgrade-16/
1•louislef299•17m ago•0 comments

From AGI to ASI

https://deepmind.google/research/publications/239142/
1•danielmorozoff•21m ago•0 comments

Playbook on how to make an AI Movie (this one got funded)

https://twitter.com/PJaccetturo/status/2066870939644813487
1•titusblair•21m ago•0 comments

MicroGPT and Interactive Walkthrough

https://researcher111.github.io/ML-Security-Public/labs/lab-02/microgpt.html
1•learning2Grow•21m ago•0 comments

Leaked OpenAI financials show $38.5B loss and compute burn

https://runtimewire.com/article/openai-leaked-financials-altman-compute-burn
3•TechApocalypse•21m ago•1 comments

From AGI to ASI

https://arxiv.org/abs/2606.12683
1•danielmorozoff•21m ago•0 comments

Cursor Says 1.5T Parameter Coding Model Is Training on 100k GPUs

https://runtimewire.com/article/cursor-1-5t-model-100000-gpus-compile
2•TechApocalypse•22m ago•0 comments

Hackers Publish Knicks and Madison Square Garden Data Online

https://www.404media.co/hackers-publish-knicks-and-madison-square-garden-data-online/
3•Cider9986•31m ago•2 comments

GE-265 / Dartmouth Time-Sharing System Revisited

https://icm.museum/blog/?p=564
4•sdf_pubnix•33m ago•0 comments

The AI Boom's Hunt for Cash Hits a New Corner of the Bond Market

https://www.wsj.com/finance/investing/the-ai-booms-hunt-for-cash-hits-a-new-corner-of-the-bond-ma...
2•ilreb•34m ago•0 comments

Slopmith (popular Rocksmith inspired guitar game) slapped with DMCA takedown

https://old.reddit.com/r/rocksmith/comments/1u6jg96/dmca_takedown_notice_for_slopsmith/
2•webprofusion•36m ago•1 comments

Show HN: Otty – a native and beautiful terminal emulator

https://otty.sh/
2•ilchenearly•37m ago•0 comments

Revised Rules of Engineering Leadership

https://lethain.com/revised-rules-of-engineering-leadership/
1•RyeCombinator•39m ago•0 comments

Show HN: Building a Stateful AI Agent

https://github.com/surya17495/centri
1•suryaankata•51m ago•0 comments

DIY crane bot that tidies up a room

https://hackaday.com/2026/06/15/building-a-ceiling-based-crane-robot-to-keep-a-room-clean/
4•soupspaces•53m ago•1 comments

Seventeen Camels and Where They Can Take You

https://mathenchant.wordpress.com/2026/06/15/seventeen-camels-and-where-they-can-take-you/
1•akkartik•57m ago•0 comments

Flax debugging: making a hash of things

https://www.gilesthomas.com/2026/06/hashing-jax-parameters
1•gpjt•58m ago•0 comments

Multiple mastra NPM packages compromised

https://github.com/mastra-ai/mastra/issues/18045
3•varunsharma07•58m ago•1 comments

Should nicotine be regulated like a narcotic?

https://www.nature.com/articles/d41586-026-01903-z
3•ilreb•59m ago•1 comments

Show HN: penguinAI – the c.ai alternative focused on privacy, no self-hosting

https://penguinai.pages.dev/
1•telui•59m ago•0 comments

Creating a Dynamic Favicon with Cloudinary

https://www.raymondcamden.com/2026/06/16/creating-a-dynamic-favicon-with-cloudinary
3•mooreds•1h ago•0 comments

A rat sighting in New Zealand can trigger an urgent response

https://www.theguardian.com/world/2026/jun/17/rat-hunters-catchers-predator-free-new-zealand-well...
4•rguiscard•1h ago•0 comments

The Physics of a Fable

https://twitter.com/Rafa_Schwinger/status/2066230802439180447
3•gmays•1h ago•0 comments

The Ease of Expertise

https://fields.medium.com/the-ease-of-expertise-8ad7b8670479
1•mooreds•1h ago•0 comments

The Next Layer of Blockchain Infrastructure Is Execution Memory

https://blog.bridgexapi.io/execution-intelligence-needs-reconstruction
2•Bridgexapi•1h ago•0 comments