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

The Download: Claude's inner workings, and the future of world models

https://www.technologyreview.com/2026/07/14/1140391/the-download-anthropic-claude-internal-though...
1•joozio•10s ago•0 comments

Sentinel-2 Paint: Recreate Any Image from Real Satellite Imagery

https://geospatialml.com/posts/sentinel2-paint/
1•altilunium•14s ago•0 comments

What Is Enlightenment (Kant)

https://www.columbia.edu/acis/ets/CCREAD/etscc/kant.html
1•jsenn•21s ago•0 comments

Show HN: An open-source Claude skill that stops AI building the wrong app

https://github.com/TexasBedouin/vibe-check
1•arabsson•42s ago•0 comments

The Linux.org Story

https://www.linux.org/threads/the-linux-org-story.68810/
1•Tomte•3m ago•0 comments

The Tower Keeps Rising

https://lucumr.pocoo.org/2026/7/13/the-tower-keeps-rising/
2•cdrnsf•3m ago•0 comments

Tensor Notation in Mathup

https://mathup.xyz/#tensors
1•runarberg•3m ago•0 comments

Microsoft Experimentation and Configuration Service (ECS) Chatbot

https://ecs-friday.com
1•guessmyname•3m ago•0 comments

China caught the first stage of a Long March 10B in a net

https://spacedaily.com/sd-china-just-caught-a-rocket-booster-in-a-net-at-sea-and-the-detail-every...
1•ZeljkoS•3m ago•0 comments

S&P downgrades Oracle to BBB – only one notch above junk level

https://www.heise.de/en/news/S-P-downgrades-Oracle-to-BBB-only-one-notch-above-junk-level-1136347...
3•gepeto42•4m ago•0 comments

Show HN: Dostoevsky's "Crime and Punishment" with an inline, spoiler aware guide

https://magicbookshelf.org/read/crime-and-punishment/
1•philipfweiss•4m ago•1 comments

How to Center an Element in CSS

https://css-generators.com/center/
1•LouisLazaris•4m ago•0 comments

Analyzing Occupations of Movie Protagonists from 100 Years of Film

https://anam.al/posts/movies_jobs
1•idleplant•5m ago•0 comments

Global talent visas for software engineers without a job offer

https://relocateme.substack.com/p/talent-visas-in-2026-a-relocation
1•andrewstetsenko•7m ago•0 comments

First impressions after getting back on social media

https://nandinfinitum.com/posts/social-media-first-impressions/
2•nanfinitum•9m ago•0 comments

Agent Shell – persistent AI dev boxes from shell host running since 2009

https://www.xshellz.com/
1•stfnon•10m ago•0 comments

Show HN: CiaoTutor - Voice-based Italian tutor for B1 and beyond learners

https://ciaotutor.com/
1•alexmancini•10m ago•0 comments

Gemma 4 Technical Report

https://arxiv.org/abs/2607.02770
1•gmays•13m ago•0 comments

Uber in Advanced Talks to Buy Delivery Hero

https://www.bloomberg.com/news/articles/2026-07-14/uber-is-said-to-be-in-advanced-talks-on-delive...
1•aanet•13m ago•0 comments

Advice for a Young Investigator

https://pmc.ncbi.nlm.nih.gov/articles/PMC5198756/
1•kkoncevicius•14m ago•0 comments

Oklo, the Earth's two-billion- year-old only known natural nuclear reactor [pdf]

https://www.iaea.org/sites/default/files/publications/magazines/bulletin/bull59-2/5922627.pdf
2•thunderbong•14m ago•0 comments

What would a land value tax do?

https://taxpolicy.org.uk/2026/07/12/what-would-a-land-value-tax-actually-do/
2•AndrewDucker•14m ago•0 comments

Show HN: Bold – Catch when one user can read another user's data in live traffic

https://www.bedpage.com/
1•Sahith59•16m ago•0 comments

Cleaf – A small text editor for Linux with big ideas

https://github.com/Logic-gate/cleaf
2•mad_dev•17m ago•2 comments

A beginner's guide to Chekhov's short stories

https://clutteredpapers.substack.com/p/chekhov-stories
1•lermontov•17m ago•0 comments

Feedback Epistemic Equilibrium Law (Feel)

https://github.com/PHANTOM-z3/Feedback-Epistemic-Equilibrium-Law-FEEL-
1•AIsafety393•18m ago•0 comments

Yivi

https://yivi.app/en/
2•exceptione•18m ago•1 comments

Agentmetry, catch your AI coding agent reading –/.ssh and phoning home

https://github.com/blitzcrieg1/agentmetry
1•blitzcrieg1•19m ago•0 comments

Interactive Map of Every NYC Neighborhood

https://nycneighborhoods.app/
1•altilunium•19m ago•1 comments

DealDialog – normalized, matched alerts for multi-country govt tenders

https://dealdialog.com/demo
1•Northtide•20m ago•0 comments