frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Fuzzing 101

https://github.com/antonio-morales/Fuzzing101
1•saikatsg•2m ago•0 comments

To, mostly, guarantee success in your career

https://www.elliotcsmith.com/how-to-mostly-guarantee-success-in-your-career/
1•smitec•5m ago•0 comments

Australia hits power demand record as renewables pass 50pc milestone

https://www.abc.net.au/news/2026-01-29/australia-hits-power-demand-record-as-renewables-pass-50pc...
1•flgb•6m ago•0 comments

Internet Archive web. partial outage

https://web.archive.org/web/20040609220929/http://home.att.net/~stickworks/
1•burnt-resistor•7m ago•2 comments

Dark Software Engineering

https://www.julianmwagner.com/articles/dark-software-fabric
1•jwpapi•15m ago•0 comments

MCP Apps are here after OpenAI apps SDK

http://blog.modelcontextprotocol.io/posts/2026-01-26-mcp-apps/
1•astro_09•16m ago•0 comments

OpenAI's Unit Economics

https://www.exponentialview.co/p/inside-openais-unit-economics-epoch-exponentialview
1•swolpers•16m ago•0 comments

Show HN: Introducing: HTTPS://nicer.app/wiki/frontpage

https://nicer.app/wiki/frontpage
1•rene-veerman•23m ago•0 comments

A knowledge management system inspired by plain-text accounting

https://thalo.rejot.dev/blog/plain-text-knowledge-management
1•WilcoKruijer•24m ago•0 comments

Crucible of the Cascade: The crash of Gazpromavia flight 9608 (2025)

https://admiralcloudberg.medium.com/crucible-of-the-cascade-the-crash-of-gazpromavia-flight-9608-...
1•hahahahhaah•25m ago•0 comments

Deep Dive on HBM

https://www.nomadsemi.com/p/deep-dive-on-hbm
2•walterbell•28m ago•0 comments

Show HN: My workflow for editing and compiling videos as a programmer

https://initcoder.com/posts/my-workflow-for-editing-video-as-a-programmer/
2•chbkall•28m ago•0 comments

A TODO List that works (2023)

https://www.softwaredesign.ing/blog/todo-list-that-actually-works
2•cachius•28m ago•0 comments

Show HN: Selling New Era Calculator

2•sandeepkd•31m ago•0 comments

Adding structure once you find PMF

https://holenventures.substack.com/p/adding-structure-to-a-spike
2•hholen•31m ago•0 comments

How to Build an Agent

https://ampcode.com/how-to-build-an-agent
2•jen20•34m ago•0 comments

SQLite in Production? Not So Fast for Complex Queries

https://yyhh.org/blog/2026/01/sqlite-in-production-not-so-fast-for-complex-queries/
3•dimitar•37m ago•0 comments

Show HN: Collection of resources to make production-grade Systems

https://github.com/legendaryabhi/zero-to-production
2•rudr12345•37m ago•1 comments

US cyber defense chief accidentally uploaded secret government info to ChatGPT

https://arstechnica.com/tech-policy/2026/01/us-cyber-defense-chief-accidentally-uploaded-secret-g...
7•goplayoutside•44m ago•0 comments

Is time a fundamental part of reality? A quiet revolution in physics suggests no

https://theconversation.com/is-time-a-fundamental-part-of-reality-a-quiet-revolution-in-physics-s...
4•mikhael•47m ago•0 comments

Helix 02: Full-Body Autonomy

https://www.figure.ai/news/helix-02
3•pr337h4m•48m ago•0 comments

Listen to the AirTag's remixed new chime

https://www.macworld.com/article/3045497/listen-to-the-airtags-remixed-new-chime.html
1•01-_-•50m ago•0 comments

Grassroots Coalition Plans Nationwide Jan 30 Strike Against ICE

https://nationalshutdown.org
20•Lwrless•51m ago•1 comments

Show HN: TheBaduk – A Go/Baduk Platform Built with Vanilla JavaScript

https://thebaduk.com
3•bugon•53m ago•0 comments

The Great British Treasure Hunt

https://www.royalmint.com/shop/limited-editions/the-great-british-treasure-hunt/
2•helsinkiandrew•54m ago•0 comments

Test your interpretability techniques by de-censoring Chinese models

https://www.lesswrong.com/posts/7gp76q4rWLFi6sFqm/test-your-interpretability-techniques-by-de-cen...
2•allenleee•54m ago•0 comments

The Only Moat Left Is Knowing Things

https://growtika.com/blog/authenticity-edge
3•Growtika•56m ago•0 comments

It is incorrect to "normalize" // in HTTP URL paths

https://runxiyu.org/comp/doubleslash/
1•birdculture•56m ago•1 comments

Analysis: The Mathematics Behind Pokemon Type Combinations

1•lincyang•58m ago•0 comments

The GenAI era started. Just a few words in essays

http://codrutapoenaru.blogspot.com/
1•pcodruta•1h ago•0 comments