frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•12mo 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•12mo 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•12mo 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).

JDownloader Website Installer Incident

https://jdownloader.org/lib/scripts/incident_8.5.2026.html
1•layer8•22s ago•0 comments

Timebook – Time tracking and invoicing your AI agent can use

https://usetimebook.com
1•pro_methe5•4m ago•0 comments

Ask HN: Do you know the ethics of Developers?

1•eropatori•5m ago•0 comments

Lastest – Visaul Verification of AI Developmetn

https://github.com/las-team/lastest
1•ewyct•8m ago•1 comments

Ask HN: Best static site generator for a docs site in 2026?

1•agenttestjekuqz•8m ago•0 comments

UK firefighters called to one lithium-ion battery fire every five hours

https://www.theguardian.com/uk-news/2026/may/11/uk-firefighters-lithium-ion-battery-fires-ebikes
1•wrxd•11m ago•0 comments

Devenv 2.1: Nix with zsh, fish, and nushell via libghostty

https://devenv.sh/blog/2026/05/07/devenv-21-nix-with-zsh-fish-and-nushell-via-libghostty/
1•zupo•13m ago•0 comments

AWS says acute server memory shortage is driving customers to the cloud

https://www.theregister.com/off-prem/2026/04/30/aws-says-server-memory-shortage-pushing-customers...
1•tcp_handshaker•15m ago•0 comments

Open-Source Models for Text Rendering and Image Editing

https://firethering.com/best-open-source-ai-image-text-rendering-models/
1•steveharing1•16m ago•0 comments

"Hypergravity" Rewires Biology over the Long Haul

https://www.universetoday.com/articles/hypergravity-rewires-biology-over-the-long-haul
1•tcp_handshaker•17m ago•0 comments

Watching for File Changes on macOS

https://alexwlchan.net/2026/watch-files-on-macos/
1•ingve•18m ago•0 comments

Confusion: just enough MDL to play Zork (2009)

https://rec.arts.int-fiction.narkive.com/pM8Kgfbw/confusion-just-enough-mdl
1•exvi•20m ago•0 comments

AI data centers face increasing complaints about inaudible but 'felt' infrasound

https://www.tomshardware.com/tech-industry/artificial-intelligence/data-centers-face-increasing-i...
1•tcp_handshaker•21m ago•0 comments

Who is Marcus Rodriguez? [video]

https://www.youtube.com/shorts/NG1zo-sR_y4
1•aragonite•21m ago•0 comments

Nick Bostrom Has a Plan for Humanity's 'Big Retirement'

https://www.wired.com/story/nick-bostrom-has-a-plan-for-humanitys-big-retirement/
1•danielmorozoff•24m ago•0 comments

Truth Social lays bare narrow obsessions of an online president

https://www.npr.org/2026/05/08/nx-s1-5749358/trump-truth-social-online-posts-iran-white-house-bal...
2•robtherobber•24m ago•0 comments

Show HN: Groxy – a Go library for building forward proxy servers

https://github.com/SalzDevs/groxy
2•SalzDevs•25m ago•0 comments

An AI‑enabled device code phishing campaign

https://www.microsoft.com/en-us/security/blog/2026/04/06/ai-enabled-device-code-phishing-campaign...
1•buccal•27m ago•1 comments

Programming the Commodore 128

https://retrogamecoders.com/programming-the-commodore-128/
1•ibobev•27m ago•0 comments

Big Tech's $725B AI spending spree sends free cash flow to a decade low

https://www.ft.com/content/b3dfaba9-17a2-4fac-90fe-4ab3ca7c9494
1•bram98•28m ago•0 comments

Emulating Old Junk from Yesteryear

https://themaister.net/blog/2026/05/09/emulating-old-junk-from-yesteryear-or-my-obsession-making-...
1•ibobev•28m ago•0 comments

Comparing an LZ4 Decompressor on Four Legacy CPUs

https://bumbershootsoft.wordpress.com/2026/05/09/comparing-an-lz4-decompressor-on-four-legacy-cpus/
1•ibobev•29m ago•0 comments

Jewish American pedophiles hide from justice in Israel (2020)

https://www.cbsnews.com/news/how-jewish-american-pedophiles-hide-from-justice-in-israel/
2•rdevilla•33m ago•0 comments

Show HN: AI Tool for Batch-Generating Multi-Platform Marketing Content

1•zzh030902•34m ago•0 comments

Dusk Is Now Available

https://twilitrealm.dev/posts/2026-05-09-dusk-v1-released/
1•novoreorx•34m ago•0 comments

The Adventure Family Tree

https://mipmip.org/advfamily/advfamily.html
1•exvi•37m ago•0 comments

RSSTranslate – Translate any RSS feed to JSON with one API call

https://rsstranslate.com/
1•kophazialmos•38m ago•0 comments

Crowther's Adventure for Linux (2007)

https://web.archive.org/web/20090831075301/http://www.russotto.net/~mrussotto/ADVENT/
1•exvi•38m ago•0 comments

The AI That Took a Sunday Off

https://debarshibasak.github.io/readables/blogs/eu-ai-right.html
1•debarshri•41m ago•1 comments

Meet the academics refusing to use generative AI

https://www.nature.com/articles/d41586-026-00508-w
2•XzetaU8•44m ago•1 comments