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

Virtual Surveyor 10.3 drone-surveying and mapping

1•asksoft•1m ago•0 comments

DiffX – Next-Generation Extensible Diff Format (2025)

https://diffx.org/
1•zenincognito•1m ago•0 comments

Freya: Build cross-platform, performant, accessible and unique apps with Rust

https://freyaui.dev/
1•andunie•3m ago•0 comments

Qwen4-Max is now in Preview

https://twitter.com/Alibaba_Qwen/status/2120335993643684315
2•potwinkle•6m ago•0 comments

The FDA Hides Where Your Drugs Are Made [video]

https://www.youtube.com/watch?v=_MwQeiiO9Ec
1•dataflow•6m ago•0 comments

Signs You're Working in a Feature Factory (2016)

https://cutle.fish/blog/12-signs-youre-working-in-a-feature-factory/
2•sren•8m ago•0 comments

Movistar Blocks Its Own Support Forum Under LaLiga Anti-Piracy Order

https://torrentfreak.com/movistar-blocks-its-own-support-forum-under-laliga-anti-piracy-order/
1•gslin•10m ago•0 comments

Hooked on Tuna

https://blue-continuum.com/hooked-on-tuna
2•dnetesn•16m ago•0 comments

Rooting Multiple ISPs with Hyperglass

https://hyperpwn.xyz/
2•csmantle•22m ago•0 comments

Brazil's Largest Port Hit by Major IT Outage; Suspected Ransomware Cyberattack

https://uknip.co.uk/news/uk/uk-news/brazils-largest-port-hit-by-major-it-outage-amid-suspected-ra...
1•dvaplima•25m ago•0 comments

Ask HN: Why doesn't Ramp AI Index include OpenRouter or other aggregators?

1•ddxv•27m ago•0 comments

Anthropic Software Engineer Salaries

https://www.levels.fyi/companies/anthropic/salaries/software-engineer
1•zuhayeer•29m ago•0 comments

The indie game community is in disarray over AI and Big Walk

https://www.theverge.com/games/1030994/big-walk-independent-games-festival-igf-ai
2•tasoeur•30m ago•0 comments

State of the tech job market: late 2026

https://www.lennysnewsletter.com/p/state-of-the-tech-job-market-late
1•flowerlad•32m ago•2 comments

Discontinuation of Google and Apple Accounts Linking to Nintendo Accounts

https://www.nintendo.com/en-gb/Support/Nintendo-Account/Discontinuation-of-Google-and-Apple-accou...
2•thunderbong•32m ago•0 comments

Show HN: A company running in an AI harness

https://restless.run/
2•yaoke259•32m ago•2 comments

GSD-LQ: Zero-calibration sub-4-bit compression and 7B in 3.78 GB VRAM

https://github.com/Phantom309-CED/GSD-LQ/tree/main/gsd_lq_v2
1•Phantom309-CED•33m ago•0 comments

Tokenizers

https://jechevarria.com/blog/2026/11/11/tokenizers/
1•j_echevarria•34m ago•0 comments

Toyota Sees a U.S. Future for Tiny Trucks with a Devoted Following (Kei Trucks)

https://www.nytimes.com/2026/11/10/business/toyota-kei-pickup-truck.html
1•rawgabbit•35m ago•0 comments

Microsoft employee price list from 1987

https://devblogs.microsoft.com/oldnewthing/20261110-00/?p=112843/
1•soheilpro•40m ago•0 comments

A great old-timey game-programming hack (2013)

https://blog.moertel.com/posts/2013-12-14-great-old-timey-game-programming-hack.html
18•palsecam•43m ago•1 comments

How to Be a Good Farrier: What the Car Teaches Us About AI and Your Job

https://www.sethserver.com/ai/how-to-be-a-good-farrier.html
1•sethito•46m ago•0 comments

E-means: outperforming k-means (in one-tenth the epochs)

https://arxiv.org/abs/2611.09501
1•Anon84•46m ago•0 comments

Reddit Reviews

https://redditinc.com/news/introducing-reddit-reviews
6•soheilpro•47m ago•3 comments

The Sicilian Citrus Family Tree

https://www.notesfromtheroad.com/europa/citrus-family-tree.html
1•wmchen•47m ago•0 comments

Vote the Page: a website rewritten every hour by its top-voted prompt

https://votethepage.com/
2•mark-glue•49m ago•0 comments

Claude usage limit reset is a gambler's rush

1•hoppp•50m ago•1 comments

Could AI's leading men become as powerful as Ford or Rockefeller?

https://www.economist.com/business/2026/04/16/could-ais-leading-men-become-as-powerful-as-ford-or...
2•gmays•51m ago•1 comments

Planetocopia (2002-2017)

http://www.worlddreambank.org/P/PLANETS.HTM
1•OgsyedIE•51m ago•0 comments

Show HN: HC – a HyperCard clone that runs original stacks on today's Macs

https://hc.labynet.fr/en.html
3•cleobuline•54m ago•0 comments