frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Manifesto for Restorative Justice and Human Rights

https://www.euforumrj.org/manifesto-restorative-justice-and-human-rights
1•rendx•33s ago•0 comments

My Claude Code Toolkit

https://newartisans.com/2026/02/my-claude-code-toolkit/
1•simonmic•1m ago•0 comments

Cereggii: Thread Synchronization Utilities for Python

https://github.com/dpdani/cereggii
1•PaulHoule•4m ago•0 comments

New to Engineering and Feeling of Responsibility

1•BobCatJamesDean•5m ago•0 comments

The Monobloc: the best-selling chair

https://www.domusweb.it/en/design/2025/02/20/monobloc-chair-history.html
1•olalonde•5m ago•0 comments

Designing a SystemVerilog Language Server

https://www.hudsonrivertrading.com/hrtbeat/designing-a-systemverilog-language-server/
1•hasheddan•6m ago•0 comments

Escaping the LemonSqueezy Nightmare

https://leoloso.com/posts/escaping-the-lemonsqueezy-nightmare-migrating-my-ecommerce-elsewhere/
1•leoloso•6m ago•0 comments

GoGogot – AI agent in Go, ~15 MB binary, ~10 MB RAM, MiniMax 2.5

https://go-go-got.com
1•aspasskiy•6m ago•1 comments

Show HN: ScreenStack – AI-native platform purpose-built for technical interviews

https://screenstack.tech/
1•ud0•7m ago•0 comments

Show HN: Elia – Governed hybrid architecture (LLM is capability, not authority)

https://github.com/Jmc-arch/elia-governed-hybrid-architecture
1•JMC-FR•10m ago•0 comments

Show HN: How the IP Leasing Market Fakes Legitimacy

1•xunairah•10m ago•0 comments

Graeco-Arabic translation movement

https://en.wikipedia.org/wiki/Graeco-Arabic_translation_movement
1•teleforce•10m ago•0 comments

Boy I was wrong about the Fediverse

https://matduggan.com/boy-i-was-wrong-about-the-fediverse/
1•wrxd•11m ago•0 comments

Ask HN: In the age of AI, how are you marketing your products to differentiate?

1•Gooblebrai•14m ago•0 comments

Show HN: GeoDirect – Create universal map links that work everywhere

https://geodirect.io
1•pascalveze•15m ago•0 comments

System Design and ML Interview Material

https://github.com/Ali-Meh619/System_Design_Principles
2•alimeh•17m ago•1 comments

System Design and Machine Learning Interview Material

1•alimeh•18m ago•0 comments

While Hinkley Nuclear Was Being Built, the UK Grid Decarbonized

https://cleantechnica.com/2026/03/06/while-hinkley-nuclear-was-being-built-the-uk-grid-decarbonized/
1•toomuchtodo•22m ago•1 comments

Simple Maturin Based Python Bindings to Scryer Prolog

https://github.com/philzook58/scryerpy
1•triska•30m ago•0 comments

OpenChaos: Strangers vote on what code ships to production (2 months in)

https://blog.openchaos.dev/posts/weeks-8-and-9-the-bot-only-listened-to-its-master
2•skridlevsky•31m ago•0 comments

Show HN: CV10X – AI resume builder that remembers your profile

https://www.cv10x.com
1•ennemlimuhssin•31m ago•0 comments

Writing a simple VM in less than 125 lines of C (2021)

https://www.andreinc.net/2021/12/01/writing-a-simple-vm-in-less-than-125-lines-of-c/
2•birdculture•33m ago•0 comments

Ask HN: Doctor with software development experience – careers combining both?

2•frank-cheynne•35m ago•0 comments

Uploading Pirated Books via BitTorrent Qualifies as Fair Use, Meta Argues

https://torrentfreak.com/uploading-pirated-books-via-bittorrent-qualifies-as-fair-use-meta/
1•askl•38m ago•0 comments

Show HN: Spectra – local finance dashboard with offline ML categorization

https://www.withspectra.app/
1•francesco_gab•40m ago•0 comments

Cloudflare-Native Starter Kits

https://greeff.dev/starter-kits
1•pio_greeff•42m ago•0 comments

Show HN: Pre-Launch – $15/Mo Status Page (Vs Atlassian $299) – Join Waitlist

2•Powellfgn•49m ago•0 comments

Hetzner bans website for 'violating terms'

https://twitter.com/tyleraloevera/status/2030064144980873434
2•timedude•52m ago•2 comments

Show HN: µJS, a 5KB alternative to Htmx and Turbo with zero dependencies

https://mujs.org
2•amaury_bouchard•58m ago•0 comments

NASA's Dart Mission Changed Orbit of Asteroid Around Sun

https://www.jpl.nasa.gov/news/nasas-dart-mission-changed-orbit-of-asteroid-didymos-around-sun/
2•merksittich•58m ago•0 comments