frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

LLM Wiki

https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f
1•tamnd•1m ago•0 comments

Razer Wolverine V3 Pro and Betop KP50 Controllers to Be Supported by Linux 7.0

https://www.phoronix.com/news/Linux-7.0-rc7-Input-Fixes
1•doener•2m ago•0 comments

Neovim TreeSitter plugin has been archived on GitHub

https://github.com/nvim-treesitter/nvim-treesitter
2•ComputerGuru•3m ago•1 comments

FAA prohibits SFO's parallel approaches

https://www.reuters.com/world/us/faa-imposes-restrictions-some-landings-san-francisco-airport-202...
1•elromulous•3m ago•0 comments

Show HN: Trading harness for Indian stock market

https://github.com/hopit-ai/india-trade-cli
1•Arkid•4m ago•0 comments

Why the Most Valuable Things You Know Are Things You Cannot Say

https://deadneurons.substack.com/p/why-the-most-valuable-things-you
2•nr378•9m ago•0 comments

Show HN: DocMason – Agent Knowledge Base for local complex office files

https://github.com/jetxu-llm/docmason
2•Jet_Xu•10m ago•0 comments

Turn safety data sheets into structured JSON via API

https://turninto.dev/
1•VelaA•11m ago•0 comments

Gemma 4 running client-side in WebGPU

https://huggingface.co/spaces/webml-community/Gemma-4-WebGPU
4•astlouis44•12m ago•0 comments

Neuronal APOE4-induced early hippocampal hyperexcitability in Alzheimers disease

https://www.nature.com/articles/s43587-026-01096-0
1•bookofjoe•12m ago•0 comments

Show HN: A game where you build a GPU

https://jaso1024.com/mvidia/
7•Jaso1024•13m ago•0 comments

12,000 AI-generated blog posts added in a single commit

https://github.com/OneUptime/blog/commit/30cd2384794c897d95aca77d173db44af51ca849
4•noslop•14m ago•0 comments

Meta: A Cautionary Tale [video]

https://www.youtube.com/watch?v=DNCQ5kV-cKs
1•raydev•15m ago•1 comments

Rust terminal projects in 3 years

https://blog.orhun.dev/800-rust-projects/
1•birdculture•16m ago•0 comments

What Happened with the Axios Compromise

https://twitter.com/aakashgupta/status/2040171739926393151
1•CPLX•17m ago•0 comments

Show HN: DocMason – AI Agent Knowledge Base for local complex office files

https://github.com/JetXu-LLM/DocMason
2•Jet_Xu•17m ago•0 comments

GB Renewables Map

https://renewables-map.robinhawkes.com/#5/55/-3.2
1•DamonHD•18m ago•0 comments

There Is a RAM Shortage

https://www.npr.org/2026/02/21/nx-s1-5719256/theres-a-shortage-of-ram-computer-memory-how-is-this...
3•paulpauper•20m ago•0 comments

Tokens: The New Oil – By Kent Beck

https://tidyfirst.substack.com/p/tokens-the-new-oil
3•paulpauper•21m ago•0 comments

Show HN: Termtrace – Record and replay terminal sessions as traces

1•amalChandru•21m ago•0 comments

Six Flags Was a Summer Destination. Can It Win Families Back?

https://www.nytimes.com/2026/04/02/business/six-flags-parks-closing-debt-attendance.html
1•duxup•24m ago•3 comments

In the Gulf, GPS jamming leaves delivery drivers navigating blind

https://restofworld.org/2026/gps-disruption-gulf-gig-workers/
2•donohoe•24m ago•0 comments

Show HN: SFS – A FUSE-based filesystem with SSH transport writen in Rust

https://github.com/skorotkiewicz/sfs
2•modinfo•25m ago•0 comments

Carbible.net: Car Guide

https://carbible.net/
1•polyspora•26m ago•1 comments

Iran is a distraction [video]

https://www.youtube.com/watch?v=koa2wUeWJL8
1•teleforce•27m ago•0 comments

Milgram's subjects were never aligned

https://hollisrobbinsanecdotal.substack.com/p/milgrams-subjects-were-never-aligned
1•mattas•27m ago•0 comments

What an Ivy League Education Gets You

https://www.theatlantic.com/ideas/2026/04/ivy-league-education-income/686682/
2•paulpauper•27m ago•1 comments

Octopus Energy's Agile Prices

https://agileprices.co.uk/
4•jonatron•28m ago•0 comments

How much it costs to attend a game at every MLB ballpark

https://visityourteam.com/mlb/rankings/game-day-costs
1•smarthomeu•28m ago•0 comments

Show HN: Detect7 – automatic DDoS protection layered on Cloudflare

https://detect7.com/
1•rk-baku•28m ago•0 comments