frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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).

An Introduction to Galois Fields and Reed-Solomon Coding [pdf]

https://people.computing.clemson.edu/~jmarty/papers/IntroToGaloisFieldsAndRSCoding.pdf
1•teleforce•1m ago•0 comments

Show HN: Save Context from MCP Bloat

https://github.com/healqq/mcp-content-guard
1•healqq•3m ago•0 comments

Additive FFT Explained: Fast Fourier Transforms over Binary Fields

https://blog.lambdaclass.com/additive-fft-background/
1•teleforce•7m ago•0 comments

The Streaming Latency Tradeoff: Why Some TTS Models Lose Accuracy in Real Time

https://deepgram.com/learn/streaming-tts-latency-accuracy-tradeoff
1•ChicknNuggt•10m ago•1 comments

The Mythical Agent-Month

https://wesmckinney.com/blog/mythical-agent-month/
2•fagnerbrack•16m ago•1 comments

Programmers Spend Their Time – Probably Dance

https://probablydance.com/2026/02/10/how-programmers-spend-their-time/
2•fagnerbrack•17m ago•0 comments

Global Energy Flow – Real-Time Energy Intelligence

https://global-energy-flow.com/
2•xbmcuser•17m ago•1 comments

Show HN: Codiff, a local diff review tool

https://github.com/nkzw-tech/codiff/releases
3•cpojer•17m ago•1 comments

How we made Notion available offline

https://www.notion.com/blog/how-we-made-notion-available-offline
1•fagnerbrack•18m ago•0 comments

We let four AIs run radio stations. Here's what happened.

https://andonlabs.com/blog/andon-fm
1•thm•21m ago•0 comments

Show HN: Give your AI agent a brain that understands your codebase

https://github.com/bitloops/bitloops
1•sergiopreira•24m ago•0 comments

Compared a few OpenClaw hosting setups

https://docs.google.com/spreadsheets/d/1tVqYh8fAWLAFAuuM3-G0WVoFqY6VKJ8pgFdS3zvux80/edit?gid=2137...
3•VishnuTech•29m ago•0 comments

Forum

https://bestsugardaddyapps.com/forum/
2•whatsupdog•32m ago•0 comments

A blog post is a query for people who will route interesting stuff to you

https://www.henrikkarlsson.xyz/p/search-query
1•James72689•35m ago•0 comments

Useful Security Tooling

https://app.securl.online
2•ktbatterham•38m ago•0 comments

Molecular Dynamics on Apple M4

https://github.com/vyasgiridhar/moleqular
1•vyasgiridhar•43m ago•0 comments

My indie app was named too close to competitors and I burnt my fingers

2•phalgun_g•47m ago•1 comments

Ask HN: What LLM models are you using and why?

2•rubyn00bie•50m ago•1 comments

Ask HN: Why do hotels etc. WiFi networks all use captive portals?

1•tgsovlerkhgsel•52m ago•1 comments

What right has a "personal fortune" to be anything but working capital?

2•silexia•54m ago•0 comments

Private Hosted OpenClaw that can connect to your data with included AI models

https://platform.joinable.ai
1•tnac•57m ago•0 comments

Show HN: Machine – per-project dev VMs with session-only secrets

1•katspaugh•57m ago•0 comments

Directory of Blogs with a /Now Section

https://nownownow.com/
3•James72689•59m ago•0 comments

Five LLM agents play Werewolf in-browser, each with a private DuckDB

https://kayhan.dev/posts/013-werewolf-five-agents-one-browser/
2•keynha•1h ago•0 comments

My Wi-Fi Was Faster Than Ethernet So I Fixed It

https://www.youtube.com/watch?v=pzb7py2HeqA
1•iamflimflam1•1h ago•0 comments

An example of functional slop code

https://manemasters.vip/
2•AndrewKemendo•1h ago•2 comments

Driving

https://jzhao.xyz/posts/driving
2•wonger_•1h ago•0 comments

Groww beat every odd to get here. Now what?

https://the-ken.com/newsletters/two-by-two/groww-beat-every-odd-to-get-here-now-what/
1•vidyesh•1h ago•0 comments

AI Poop Analysis App Offered to Sell Me Database of Its Users' Poops

https://www.404media.co/ai-poop-analysis-app-offered-to-sell-me-access-to-its-users-poops/
2•tjek•1h ago•0 comments

Tesla Solar Roof is on life support as it pivot to panels

https://electrek.co/2026/05/14/tesla-solar-roof-promise-vs-reality-pivot-panels/
32•celsoazevedo•1h ago•12 comments