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

The View from Space the U.S. Government Doesn't Want You to See

https://www.nytimes.com/2026/11/11/opinion/satellite-images-us-government.html
1•droidjj•1m ago•0 comments

NASA IKOS

https://github.com/NASA-SW-VnV/ikos
1•ssernikk•2m ago•0 comments

I built an open source app to debloat and control your TV

https://github.com/man15h/tellyscope
1•man15h•3m ago•0 comments

Show HN: Rowbly – A Software Factory Manager

1•_fat_santa•3m ago•0 comments

WTF is a Sagulator? I wish I'd known before I built my kitchen

https://kerfcraft.app/blog/wtf-is-a-sagulator/
1•asoorm•3m ago•0 comments

Anthropic IPO – Dario Amodei [video]

https://www.youtube.com/watch?v=eynv5VR9qos
1•moondistance•3m ago•0 comments

Inference by the Concurrency Not by the Token

https://www.lunaroute.com/
1•erans•3m ago•1 comments

Vagrant's Licence Reverted to MIT

https://github.com/hashicorp/vagrant/commit/ab4fc5e3db1bd215ded614add4a26a81c7b5cbeb
1•patatero•4m ago•0 comments

Show HN: Mostra – talk on your live site, each point lands where you pointed

https://mostra.design/
2•dimamik•4m ago•1 comments

The absolute travesty that is Google

2•brb_bro•5m ago•0 comments

Show HN: Sheepdog – Fast and beautiful workspace for cloud coding agents

https://www.sheepdog.sh/
1•dqnamo•7m ago•0 comments

Show HN: Connect Claude Code to 10.6M Earnings Call Embeddings with FN2 AI

https://fn2.ai/claude
2•oceanplexian•8m ago•0 comments

A false smoke alarm almost drowned Jane Street's only NYC datacenter

https://michael.bacarella.com/2026/11/10/false-smoke-alarm-jane-street-datacenter/
7•mbac32768•10m ago•0 comments

Alice Huang helped move 240k banned chips into China, mostly H100 and H200

https://www.tomshardware.com/tech-industry/policy/alice-huang-reportedly-instrumental-in-securing...
7•CharlesW•11m ago•0 comments

Remembrance Day, 11 November

https://en.wikipedia.org/wiki/Remembrance_Day
2•cf100clunk•12m ago•0 comments

Paper on Reddit Migration's Impact on Lemmy (2023)

https://www.jmis.org/archive/view_article?pid=jmis-10-4-333
1•Rochus•13m ago•0 comments

Nvidia Kumo brings graph neural networks to Snowflake ML

https://medium.com/@yanivleven/the-gpu-meter-starts-when-you-forget-it-be078a94d7eb
1•yanivleven•13m ago•0 comments

The Steel Disaster in Taranto, Italy, Is a Warning to Europe

https://jacobin.com/2026/11/european-steel-production-health-environment-jobs
1•PaulHoule•15m ago•0 comments

Atmosphere Verified Operating System

https://mars-research.github.io/projects/atmo/
1•weinzierl•15m ago•0 comments

Why aren't we shipping faster now?

https://cabird.com/talks/shipping-faster/
9•azhenley•15m ago•5 comments

RefTrail – Zero-trust verification and clean-room specs for AI agents

https://github.com/kidimusicofficial-prog/reftrail
1•SEPSolutions•15m ago•0 comments

Show HN: Polishing SF Bay Area transit: a Fable 5.2 game from a few prompts

https://jakozaur.github.io/sf_bay_area_transit_fable_5_2_game/
1•jakozaur•16m ago•0 comments

My Grandmother Built an Empire Around Flannel in Postwar Korea

https://www.outsideonline.com/outdoor-gear/clothing-apparel/grandmother-flannel/
1•speckx•16m ago•0 comments

Masayoshi Son's Bet on Electrical Turbines Backfires

https://www.wsj.com/business/energy-oil/masayoshi-sons-huge-bet-on-electrical-turbines-backfires-...
1•tosh•16m ago•1 comments

Hornfiller – higher category theory, gamified

https://hornfiller.github.io
2•imidazolium•19m ago•0 comments

First self valued asset in the world needs iterations to sustain longevity

https://github.com/elykcim/Time-IS-Money/
2•elykcim•19m ago•1 comments

Osprey: The Open Solid-State Platform

https://www.quantumscape.com/osprey-the-open-solid-state-platform/
1•sshah03•21m ago•0 comments

PermissionGuide – Guided permission setup for macOS apps

https://github.com/fcjr/PermissionGuide
1•gregsadetsky•22m ago•0 comments

Lean 4 derived C-Code beats Rust in Benchmark Game

https://github.com/arjaythedev/twelve-dollar-server-challenge/pull/153
2•MrBuddyCasino•22m ago•0 comments

Show HN: Video to MP3 in the browser by reading only the MP4/MOV audio track

https://fileconverterapp.com/mp4-to-mp3/
3•furkankayadev•23m ago•0 comments