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

Clef-Omni Struggles with Similar-Sounding Spanish Words

https://camden.sh/posts/clef-omni-spanish/
1•camdenclark•2m ago•0 comments

An open-source harness for coding agents that shows its work

https://github.com/gosha70/code-copilot-team
1•iamgoga•3m ago•0 comments

Organic farm in Switzerland is growing blueberries beneath 5,220 solar panels

https://www.autonocion.com/us/5220-solar-panels-10-5-feet-organic-blueberries-switzerland-four-we...
2•thunderbong•5m ago•0 comments

The School Apps Are Out of Control

https://www.theatlantic.com/family/2026/11/school-apps-communication-broken/689312/
1•paulpauper•15m ago•0 comments

GPT-6 Astra Covertly Underperforms on Safety Research Tasks

https://thezvi.substack.com/p/gpt-6-astra-covertly-underperforms
2•paulpauper•17m ago•0 comments

South Africa's Shrinking ANC

https://unpublishablepapers.substack.com/p/kill-yourself-or-die-trying
1•paulpauper•18m ago•0 comments

Reverse Engineering with AI: Your Decompiler Can Lie to You

https://prod.codes/blog/reverse-engineering-with-ai-your-decompiler-can-lie-to-you/
2•alex09x•18m ago•0 comments

When Alexa can't answer, Claude takes over

https://github.com/rg321/hey-claude
2•mparnisari•20m ago•0 comments

TikTok's For You page needs to change, says the EU

https://www.theverge.com/tech/1028597/tiktok-eu-for-you-algorithm-rabbit-hole-effect
1•TMWNN•22m ago•0 comments

Show HN: CLI calls spend their time starting up. I cut it by 4.5x, same output

https://github.com/anthonyGosme/speedrunner
1•anthonygosme•24m ago•0 comments

EU accuses TikTok of trapping users in harmful 'rabbit holes'

https://therecord.media/eu-accuses-tiktok-of-rabbit-hole-DSA-violation
4•arbuge•30m ago•0 comments

Project Swap: What happens when agents trade for us?

https://www.anthropic.com/research/project-swap
1•gmays•32m ago•0 comments

Humanoid Musical Robots as Experimental Interfaces for Music-Evoked Emotion

https://arxiv.org/abs/2608.20433
1•gregsadetsky•37m ago•0 comments

I Toured Unitree's Factory. I'm More Bullish on the West

https://josef.cn/blog/unitree
9•josefchen•44m ago•3 comments

Implementing GPT-2 in CSS

https://shubhampatil.dev/blog/gpt2-css
4•zapt02•48m ago•0 comments

A woman possibly using AI to help murder her husband – a play

http://awbvious.com/LittleRose.html
3•awbvious•53m ago•1 comments

Show HN: SlopSlot – a slot machine inside Claude Code

https://github.com/gajus/slopslot
1•gajus•1h ago•0 comments

How hard could implementing DTLS 1.3 possibly be?

https://joturk.net/posts/dtls
1•Sean-Der•1h ago•0 comments

Locking down hibernation in Linux

https://lwn.net/SubscriberLink/1103190/767ab6f8d00fc0e3/
2•chmaynard•1h ago•0 comments

Tell HN: You can have separate agent account on GitHub

2•lukax•1h ago•2 comments

Intelligence Density

https://www.trajectory.ai/field-notes/intelligence-density
1•gmays•1h ago•0 comments

L-1 Identity Solutions Pier 2.3 Emulation: How the Iris Scan Works

https://zaage.it/projects/l1id-pier-iris-scanner-emulation/
1•phirdev•1h ago•0 comments

Sony Debuts Wired Headphones with '80s-Inspired Design

https://www.bloomberg.com/news/articles/2026-11-05/sony-debuts-retro-60-wired-headphones-in-tribu...
4•caiobegotti•1h ago•1 comments

A wearable identifies tagged objects by pointing a narrow infrared beam at them

https://arxiv.org/abs/2611.02599
1•arbayi•1h ago•0 comments

DigiNotar

https://en.wikipedia.org/wiki/DigiNotar
3•gregsadetsky•1h ago•0 comments

Mexico's Senate Approves ISP Rules to Disconnect Persistent Online Pirates

https://torrentfreak.com/mexicos-senate-approves-isp-rules-to-disconnect-persistent-online-pirates/
2•lobo_tuerto•1h ago•0 comments

Skymizer and MiTAC to Show Kimi K3 2.8T on a Single Air-Cooled Server at SC26

https://skymizer.ai/announcements/sc26-mitac-kimi-k3/
1•peter_d_sherman•1h ago•0 comments

Show HN: Goethe – The infrastructure for self-hosted AI

https://github.com/meshapplied/Goethe
5•Ir0n•1h ago•1 comments

Teaching Agents to Write Maintanable Code

https://boundaryml.com/blog/teaching-agents-to-write-maintainable-code
3•aaronvg•1h ago•0 comments

Run cloud agents from your home IP through a Tailscale tunnel

https://rtrvr.ai/blog/tailscale-tunnels-home-ip
3•arjunchint•1h ago•2 comments