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

AI-Induced Cognitive Atrophy

https://notesbylex.com/on-ai-induced-cognitive-atrophy
1•lexandstuff•2m ago•0 comments

VLC, FFmpeg, Video Codecs, Assembly Programming (Lex Fridman Podcast)

https://www.youtube.com/watch?v=nepKKz-MzFM
1•SweetSoftPillow•5m ago•0 comments

Judge Halts Colorado AI Law After xAI First Amendment Challenge

https://reclaimthenet.org/judge-halts-colorado-ai-law-after-first-amendment-challenge
4•bilsbie•11m ago•0 comments

Macro

https://macro.com
1•skogstokig•12m ago•0 comments

Sting's eye-watering fortune that his 6 kids won't be inheriting

https://www.hellomagazine.com/us/900095/sting-eye-watering-fortune-kids-will-not-inherit/
1•wslh•12m ago•0 comments

AI evaluation startup Braintrust confirms breach

https://techcrunch.com/2026/05/06/ai-evaluation-startup-braintrust-confirms-breach-tells-every-cu...
2•zachdotai•14m ago•0 comments

ReleaseJet – the release notes tool for repos with many customers

https://github.com/makisp/releasejet
2•PaulHoule•17m ago•0 comments

Omega-3 supplements may be linked to faster cognitive decline in seniors

https://medicalxpress.com/news/2026-05-omega-supplements-linked-faster-cognitive.html
1•brandonb•17m ago•1 comments

VirtualGL

https://virtualgl.org
1•NexRebular•18m ago•0 comments

SQLite Is a Library of Congress Recommended Storage Format

https://sqlite.org/locrsf.html
3•whatisabcdefgh•19m ago•0 comments

Show HN: I wrote a flight simulator in my own programming language

https://github.com/navid-m/flightsim
2•pizza_man•19m ago•2 comments

AI, Computer Literacy, and the New Divide

https://blog.vaxry.net/articles/2026-aiIsABitDifferent
2•tertle950•19m ago•0 comments

Rails Security, AI, and IBB

https://tenderlovemaking.com/2026/05/06/rails-security-ai-and-ibb/
1•riffraff•20m ago•0 comments

Firm solar and storage costs fall to $54/MWh, says IRENA

https://www.pv-magazine.com/2026/05/06/firm-solar-and-storage-costs-fall-to-54-mwh-says-irena/
2•epistasis•21m ago•0 comments

Solod v0.1: Go ergonomics, practical stdlib, native C interop

https://antonz.org/solod-v0-1/
1•jicea•22m ago•0 comments

"Would It Matter If I Told You I'm Pope Leo?"

https://www.thelettersfromleo.com/p/would-it-matter-if-i-told-you-im
1•pella•26m ago•1 comments

CSG: Why the Largest Military IPO in European History Is Combusting

https://hntrbrk.com/csg/
2•yread•27m ago•0 comments

It's time to test all adults for lipoprotein(a)

https://www.lipidjournal.com/article/S1933-2874(26)00126-1/fulltext
1•brandonb•31m ago•1 comments

Claude Code wire trace reveals 13,000 words base prompt

https://twitter.com/dominiek/status/2052119211644760473
4•dominiek•31m ago•1 comments

Agile Is Dead. Long Live Agile

https://amoebaunlimited.substack.com/p/agile-is-dead-long-live-agile
3•bryanking•33m ago•0 comments

CrustAI – Private local AI assistant

https://github.com/DaveSimoes/CrustAI
2•DaveHN_2026•34m ago•0 comments

Over 3k Datacentres planned for 2026 global map

https://roboticforce.io/datacentermap
3•cdnsteve•34m ago•0 comments

Show HN: A static website designed to be not readable by AI

http://eyes.onlytech.boo/
1•vednig•35m ago•0 comments

UI Hostility

2•morpheos137•36m ago•0 comments

Making Julia as Fast as C++

https://flow.byu.edu/posts/julia-c++
1•d_tr•41m ago•0 comments

Terminal coding agent for DeepSeek V4

https://github.com/Hmbown/DeepSeek-TUI
2•doener•41m ago•0 comments

Kestrel: Open-source sovereign AI agent framework

https://github.com/KestrelSovereignAI/kestrel-sovereign
2•Gabriela_OS_TX•41m ago•0 comments

Nvidia's Status as the Biggest Company Could Could End Soon

https://www.inc.com/moses-jeanfrancois/nvidia-alphabet-worlds-biggest-company/91341371
1•donsupreme•44m ago•0 comments

All the demons hiding in your AIs

https://drtompollak.substack.com/p/all-the-demons-hiding-in-your-ais
2•IvanLudvig•46m ago•0 comments

Connectors Now on Grok Web

https://x.ai/news/grok-connectors
2•surprisetalk•47m ago•0 comments