frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

The Lost Art of Preparing Your Own Meals

https://julienreszka.com/blog/the-lost-art-of-preparing-your-own-meals/
1•julienreszka•1m ago•0 comments

Node.js 26.7.0

https://nodejs.org/en/blog/release/v26.7.0
1•andrewstetsenko•2m ago•0 comments

$1.4B tower build for Atlassian hybrid workforce

https://itbrief.com.au/story/new-hq-for-hybrid-workforce-atlassian-central-hits-milestone
1•joeyhage•2m ago•0 comments

YouTube is on a major decluttering mission

https://www.fastcompany.com/91580299/youtube-is-on-a-major-decluttering-mission
1•andsoitis•2m ago•0 comments

Is Longevity a $1.2 Quadrillion Opportunity?

https://metatrends.substack.com/p/is-longevity-a-12-quadrillion-opportunity
1•chegra•2m ago•0 comments

We're not done with point clouds

https://claytonwramsey.com/blog/mvt/
1•birdculture•2m ago•0 comments

OpenAI COO Resigns

https://xcancel.com/bradlightcap/status/2087211567012032862
1•iamskeole•2m ago•0 comments

Euclidean affine functions and their application to calendar algorithms

https://onlinelibrary.wiley.com/doi/full/10.1002/spe.3172
1•fanf2•3m ago•0 comments

To be a better programmer, write little proofs in your head

https://blog.get-nerve.com/to-be-a-better-programmer-write-little-proofs-in-your-head/
1•orphereus•3m ago•0 comments

Show HN: Get an email when Dario Amodei (or 230 others) gives an interview

https://recordal.app
1•hooda•3m ago•0 comments

Show HN: Cut LLM turns in MCP interactions by 75%+

https://github.com/Tura-AI/tura
5•turaainet•5m ago•0 comments

.com now accounts for less than 48% of YC portfolio company domains

https://www.orangecrumbs.com/stories/yc-domains
2•oyster143•6m ago•0 comments

4,099 Qubits: The Myth and Reality of Breaking RSA-2048 with Quantum Computers

https://postquantum.com/post-quantum/4099-qubits-rsa/
2•Anon84•7m ago•0 comments

Boundaryguard – detect invisible Unicode/Trojan Source attacks in CI

https://github.com/000wq123/boundaryguard
2•davor1023•7m ago•0 comments

Lightweight, zero-build reactivity library build for MPA's

https://github.com/marsbos/flynt.js
2•harrald•7m ago•0 comments

Procedural Pixel-Art Grass in Rust and WebGPU

https://jarl-game.com/blog/2d-gpu-grass-rendering/
3•credo_dev•14m ago•0 comments

DFlash changes what tokens per second means

https://piszczek.pl/blog/dflash-changes-what-tokens-per-second-means
2•pich•16m ago•0 comments

Nix didn't hang it was evaluating the world

https://www.labcraft.dev/blog/nix-didnt-hang-it-was-evaluating-the-world
4•anandsuresh•18m ago•0 comments

CoreWeave edges past quarterly revenue estimates

https://www.reuters.com/technology/coreweave-edges-past-quarterly-revenue-estimates-2026-08-11/
2•ashurandi•20m ago•0 comments

The FastLanes Unified Transport Layout

https://blog.dave.tf/post/fastlanes-utl/
2•raggi•22m ago•0 comments

Google's Gemini app surges to one billion users

https://techcrunch.com/2026/08/11/googles-gemini-app-surges-to-one-billion-users/
3•speckx•23m ago•0 comments

Becoming physically immune to brute-force attacks (2021)

https://seirdy.one/posts/2021/01/12/password-strength/
2•downbad_•24m ago•0 comments

3D Interactive Map of the Silicon Valley

https://www.levels.fyi/atlas
2•zuhayeer•26m ago•1 comments

Bumble gives up on women making the first move

https://techcrunch.com/2026/08/11/bumble-ditches-its-rule-that-kept-men-from-making-the-first-move/
5•BlueBerry2001•28m ago•1 comments

uBlock Origin no longer supporting Facebook

https://reddit.com/r/uBlockOrigin/comments/1vgcjg5/about_disgusting_facebook_devs/
3•Cider9986•28m ago•1 comments

My agent hacked my gym

http://web.archive.org/web/20260516025532/https://www.affinda.com/expert-insights/when-my-ai-agen...
2•tmrtsmith•31m ago•1 comments

Previous-Token Prediction Based LLM Near-Exact Prompt Reconstruction

https://arxiv.org/abs/2607.29378
2•doener•31m ago•0 comments

Show HN: LidAwake – Keep your Mac awake with the lid closed (200 lines of Swift)

https://github.com/deezeddd/LidAwake-Mac
1•deezedd•32m ago•0 comments

Tiled Rasterization for Large DOM Captures

https://snapdom.dev/blog/huge-page-mosaic/
2•tinchox6•33m ago•0 comments

Introducing Grok Bot

https://xcancel.com/antibot/captcha
2•StanAngeloff•33m ago•0 comments