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

AI agent skills for better second-hand decisions

https://github.com/budna-marketplace/recommerce
1•mjovanc•38s ago•0 comments

Pacer Fees Are Going Up 20%. They Should Be Going Away

https://free.law/2026/10/21/pacer-fee-increase-2027-federal-court-records-should-be-free/
1•jaredwiener•56s ago•0 comments

Zero Breach Toolkit, open source tool capable of detecting Israeli spyware

https://github.com/interplains/zero-breach
1•cyclecount•1m ago•0 comments

Run Claude and GPT on Exe.dev Without API Keys

https://blog.exe.dev/llms-without-api-keys
1•bryanmikaelian•2m ago•0 comments

Culture Is the Client (2024)

https://nicksusi.substack.com/p/culture-is-the-client
1•ssivark•2m ago•0 comments

Durable Objects Explained

https://durable.ami.ni
1•plurby•2m ago•0 comments

Training Reve 2.0 at Scale

https://app.reve.com/training-infra
1•prestemon•5m ago•0 comments

The Numbers Behind Anthropic [video]

https://www.youtube.com/watch?v=6ZrgRjdJs3o
1•Erikun•5m ago•0 comments

Tar-codec: a fast and secure tar parser for the Rust ecosystem

https://astral.sh/blog/tar-codec
1•rbanffy•7m ago•0 comments

Neuron Studio

https://huggingface.co/spaces/webml-community/neuron-studio
1•ta988•7m ago•0 comments

Oracle Data Pump Full Export Script with PDB, Retention and Email Notification

https://dincosman.com/2026/10/24/oracle-datapump-export/
1•osmandinc•7m ago•0 comments

Show HN: Full Python 3.15 Implemented in 25k LoC

2•soasme•7m ago•0 comments

SK Hynix says memory shortages to persist until 2030

https://www.theregister.com/systems/2026/10/28/sk-hynix-says-memory-shortages-to-persist-until-20...
3•pogue•7m ago•0 comments

Quake64 dor 8-bit Atari

https://kweepa.itch.io/quake64
1•rbanffy•10m ago•0 comments

Micron plans to use wafer bonding and High-NA EUV for next-gen DRAM

https://www.tomshardware.com/pc-components/dram/micron-plans-to-use-wafer-bonding-and-high-na-euv...
2•gmays•12m ago•0 comments

Notion shipped an official Linux Flatpak

https://app.linux-packages.notion.com/
4•iamrafid•13m ago•0 comments

Show HN: Breaking abroad, not yet in [your country]

https://ao.news/live/n/US
2•maxberggren•13m ago•0 comments

Show HN: Open Source CS2 Skins Marketplace (early stage)

https://github.com/getopenfloat/openfloat
6•kraktoos•14m ago•0 comments

Death and Domains: Does the Tech Need to Change?

https://tedium.co/2026/10/20/death-domains-commentary/
1•nbans•14m ago•0 comments

An Ode to OMP

https://probsteide.com/notes/oh-my-pi.html
1•probst•17m ago•0 comments

Show HN: ~, An open-source agent registry

https://github.com/trytilde/tilde
1•solsol94•17m ago•0 comments

ChicagoFLF

https://fontlibrary.org/font/chicagoflf
1•baal80spam•20m ago•0 comments

AI training platform Outlier illegally surveils European platform workers

https://noyb.eu/en/ai-training-platform-outlier-illegally-surveils-european-platform-workers
2•airhangerf15•20m ago•0 comments

Formlabs Studio 1 $699 Resin Printer

https://formlabs.com/products/form-studio-1-basic-founders-edition/
23•mhb•23m ago•11 comments

Cognitive Republic

https://shows.acast.com/cognitive-republic-building-societies-that-experiment-learn
1•smomara•24m ago•0 comments

Alien 3 Is Getting a Second Chance on the Amiga CD32, More Than 30 Years Later

https://handheldhideout.neocities.org/articles/alien-3-cd32-second-chance-amiga
2•doener•25m ago•0 comments

The cultish behavior of top AI figures (2024)

https://www.rollingstone.com/culture/culture-features/ai-companies-advocates-cult-1234954528/
3•evil_buzzard•27m ago•0 comments

A Health Update

https://furbo.org/2026/10/28/a-health-update/
3•frizlab•29m ago•0 comments

Show HN: LFM3 Video Chat

https://github.com/skorotkiewicz/lfm3-chat
4•modinfo•30m ago•0 comments

ADHD quiz no account or credit card required

https://www.neuroplusgbrain.net/
1•FDX2018•32m ago•1 comments