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

A UX Focused Guide to Building a Linux Distro for Normies

https://github.com/IAMME543/Open-But-Polished
2•masoniamme•3m ago•0 comments

Show HN: Thaw – Git branch for a running LLM (fork agents, skip prefill)

https://github.com/thaw-ai/thaw
1•nilsmatteson•6m ago•0 comments

Shantell Sans

https://shantellsans.com/process
1•aleda145•7m ago•0 comments

Show HN: Babo – A scripting natural language that works as intended

https://github.com/armbox/babo
1•theqoo•9m ago•0 comments

We Benchmarked Our Open Source Memory Tool Against a Microsoft Research Paper

https://medium.com/@vektormemory/we-benchmarked-our-open-source-memory-tool-against-a-microsoft-r...
1•vektormemory•9m ago•0 comments

Show HN: HN Station – A local-first HN desktop client with split-pane reading

https://github.com/rajeshkumarblr/hn_station
1•raj_db_dev•9m ago•0 comments

UAPs in the Siwa Oasis, Egypt [video]

https://www.youtube.com/watch?v=-RJRActuqQU&list=PL9pyFBJOY-8yvSs1y1MmtdKOoQLI5v9Zm&index=3
1•pcbtracer•10m ago•0 comments

Show HN: Presidential Stock Trade Tracker

https://www.quiverquant.com/Donald-Trump-Stock-Trades/
1•ckardat123•12m ago•0 comments

New 3D silicon chip breakthrough could extend Moore's Law for years

https://www.sciencedaily.com/releases/2026/05/260530053412.htm
1•jonbaer•12m ago•0 comments

My Remaining Use for Pen and Paper

https://jarbus.net/blog/my-remaining-use-for-pen-and-paper/
1•jarbus•13m ago•0 comments

Tesla's 'Full Self-Driving' fraud lawsuit gets first hearing in China

https://electrek.co/2026/05/30/tesla-fsd-china-lawsuit-first-hearing-10-owners/
4•breve•14m ago•0 comments

Why Deep Learning Works Even Though It Shouldn't

https://moultano.wordpress.com/2020/10/18/why-deep-learning-works-even-though-it-shouldnt/
1•simianwords•15m ago•0 comments

Show HN: AI command review drill for engineers and vibe coders

https://www.proreview.dev/
1•shaad1337•17m ago•0 comments

A browser horror game about clicking primes

https://ipipgamedev.itch.io/idle-primes
1•ABudrys•17m ago•0 comments

AWS Budgets Has an 8-Hour Delay. Your Bedrock Bill Doesn't

https://blog.llmcap.io/aws-budgets-has-an-8-hour-delay-your-bedrock-bill-doesn-t
1•cfaruk•21m ago•0 comments

Resonate: Low latency, high temporal and frequency resolution spectral analysis

https://alexandrefrancois.org/Resonate/
4•arjf•21m ago•1 comments

Step 3.7 Flash – 198B-A11B MoE vision-language model

https://huggingface.co/stepfun-ai/Step-3.7-Flash
1•dryarzeg•22m ago•0 comments

Republicans are trying to kill science in this country

https://www.npr.org/2026/05/21/nx-s1-5828768/science-funding-cuts-nih-trump-administration
5•pdar4123•22m ago•0 comments

You need to stop using Google now

https://www.youtube.com/watch?v=4WyduoGpIPo
4•cable2600•23m ago•2 comments

The AV2 Video Standard Has Released (Final v1.0 Specification)

https://av2.aomedia.org
5•ksec•27m ago•0 comments

The first documented digitallipogram – URL erases a tech giant from the alphabet

https://logoggilo.substack.com/p/abcdfhijkmnpqrstuvwxyzcom-lipogram
1•gillesr•29m ago•1 comments

Show HN: Phive

https://phive.app
1•0xCA1EB•30m ago•0 comments

Why the Brain Cannot Be a Computer

https://arxiv.org/abs/2503.10518
2•Cerchie•31m ago•0 comments

The timing of the impending crude crisis

https://www.brookings.edu/articles/the-timing-of-the-impending-crude-crisis/
3•mooreds•32m ago•0 comments

Linda Perry: Writing and Producing Hits [video]

https://www.youtube.com/watch?v=e8pmhdjHCxM
1•bartekurbanski•33m ago•0 comments

10g Upgrade

https://klaxzy.net/var/infra/10g-upgrade.html
1•klaxzygen•41m ago•0 comments

Provisioning a Private Talos Kubernetes Cluster on Hetzner Cloud

https://onatm.dev/2026/05/30/provisioning-a-private-talos-kubernetes-cluster-on-hetzner-cloud/
2•onatm•42m ago•0 comments

OpenLogi – Rust Alternative to Logi Options+

https://github.com/AprilNEA/OpenLogi
1•elmean•48m ago•2 comments

UK public data to inform decisions and build services

https://www.data.gov.uk
1•als0•49m ago•0 comments

First Drone Tree Harvest in a Real Forest

https://www.dronewatch.eu/swedish-startup-achieves-first-fully-autonomous-tree-harvest-by-drone/
3•tda•52m ago•0 comments