frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

God Mode UX: Why Your Next Interface Will Look More Like StarCraft Than Slack

https://medium.com/sadasant/god-mode-ux-why-your-next-interface-will-look-more-like-starcraft-tha...
1•walterbell•3m ago•0 comments

Some Audiobooks Outselling Hardcovers

https://www.wsj.com/tech/personal-tech/listen-to-this-some-audiobooks-are-outselling-hardcovers-1...
1•bookofjoe•6m ago•1 comments

A silly diffuse shading model

https://lisyarus.github.io/blog/posts/a-silly-diffuse-shading-model.html
1•ibobev•6m ago•0 comments

Straussian Memes: A Lens on Techniques for Mass Persuasion

https://www.lesswrong.com/posts/CAwnnKoFdcQucq4hG/straussian-memes-a-lens-on-techniques-for-mass-...
1•kp1197•8m ago•0 comments

PNGine: A WebGPU shader portability engine

https://hugodaniel.com/posts/introducing-pngine/
1•ibobev•9m ago•0 comments

What I Read in 2025

https://srajagopalan.substack.com/p/what-i-read-in-2025
1•neehao•9m ago•0 comments

Cognitive Diagnosis Framework for Evaluating Financial Large Language Models

https://arxiv.org/abs/2508.13491
2•gmays•9m ago•0 comments

Show HN: I'm student building best AI slide designer

https://smallailab.vercel.app/
2•ihsanf•10m ago•0 comments

How Rick Rubin taught me to be a better engineer

https://bytesizedchunks.net/blog/20260101/
1•mrdosija•10m ago•0 comments

Show HN: Hero section I've created for my landing page

https://typethink.ai
1•Yash16•15m ago•0 comments

"AI is just a tool," but is it really?

https://andyjarosz.substack.com/p/ai-is-just-a-tool-but-is-it-really
2•andyfilms1•16m ago•0 comments

BBR congestion control algorithm version 04

https://datatracker.ietf.org/doc/html/draft-ietf-ccwg-bbr-04
1•throwawaybutwhy•17m ago•0 comments

Why I'm Leaving Harvard

https://www.compactmag.com/article/why-im-leaving-harvard/
7•CGMthrowaway•18m ago•0 comments

Ask HN: In-person/hybrid vs. remote work: which is better for a startup?

1•bbsc•18m ago•1 comments

A Booze Ban Since the '50s Is Being Lifted in Saudi Arabia

https://www.wsj.com/world/middle-east/saudi-arabia-alcohol-ban-laws-d6f961de
2•JumpCrisscross•21m ago•0 comments

Cycling Game (Mini Neural Net Demo)

https://www.doc.ic.ac.uk/~ajd/Cycling/
3•ungreased0675•23m ago•1 comments

From Embodied AI Jailbreak to Remote Takeover of Humanoid Robots [video]

https://media.ccc.de/v/39c3-skynet-starter-kit-from-embodied-ai-jailbreak-to-remote-takeover-of-h...
1•addisaden•23m ago•0 comments

The Year the Newsletter Business Reached a Fever Pitch

https://www.wsj.com/business/media/the-year-the-newsletter-business-reached-a-fever-pitch-54a2a69e
1•JumpCrisscross•23m ago•0 comments

All Videos from 39C3: Power Cycles

https://www.youtube.com/playlist?list=PL_IxoDz1Nq2ajswL6wmP1qxyh-Iqon5oz
2•gjvc•24m ago•0 comments

Iranian Protesters Killed as Unrest Turns Violent on Fifth Day

https://www.wsj.com/world/middle-east/iranian-protesters-killed-as-unrest-turns-violent-on-fifth-...
2•JumpCrisscross•24m ago•0 comments

Silicon 'postage stamp' implant instantly emails your thoughts to AI

https://newatlas.com/medical-devices/silicon-implant-emails-thoughts-ai/
1•breve•31m ago•0 comments

List of Former Footlights Members

https://en.wikipedia.org/wiki/List_of_former_Footlights_members
1•zeristor•33m ago•1 comments

Visualization of influenza A virus entry into cells using virus-view AFM

https://www.pnas.org/doi/10.1073/pnas.2500660122
2•PaulHoule•38m ago•0 comments

(Nature) Economic inequality does not equate to poor well-being or mental health

https://twitter.com/nature/status/2006455318247604723
1•outrun86•38m ago•2 comments

Show HN: Tasker – An open-source desktop agent for browser and OS automation

https://automatewithtasker.com/
9•schnetzlerjoe•40m ago•2 comments

Neovim plugin to view Claude Code changes

https://github.com/johnernaut/claude-files.nvim
1•johnernaut•41m ago•1 comments

Show HN: Gfcli: A tool to search and install Google Fonts via terminal

https://github.com/tinsever/google-font-cli
1•tin7•42m ago•0 comments

Mock LLM APIs locally with real-world streaming physics

https://vidai.uk/platform/mock/
1•nagug•42m ago•1 comments

How have founders been successful at finding quality beta testers?

1•Megafeeder•44m ago•1 comments

The Year America's Economic Edge Evaporated

https://www.bloomberg.com/opinion/articles/2026-01-01/us-stock-market-and-gdp-lost-its-edge-in-2025
3•xqcgrek2•44m ago•1 comments