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

Midgarth Quest. Browser-Playable Mmorpg Written by AI

https://midgarth.quest/
1•anacrolix•4m ago•1 comments

Show HN: Wikihack – HackerTube, but for Wikipedia articles mentioned on HN

https://wikihack.netlify.app
1•aizk•4m ago•0 comments

Why Don't We Live in an Art Nouveau World?

https://asteriskmag.com/issues/16/why-don-t-we-life-in-an-art-nouveau-world
1•shcallaway•6m ago•0 comments

CEPO: General Framework for Improving Prompt Optimization in Multi-Agent Systems

https://arxiv.org/abs/2610.34722
1•matt_d•12m ago•0 comments

Chambers

https://chambers.gross.is
1•endtwist•12m ago•0 comments

Linux Plumbers Conference

https://lpc.events/
1•gregsadetsky•14m ago•0 comments

GPT-6.1 Terra vs. Claude Opus 5.5: Cheaper and faster in three tests at max

https://thenewstack.io/gpt-6-1-terra-vs-claude-opus-5-5/
1•runwithdata•16m ago•0 comments

Show HN: 13M opinions on 48k products extracted from Reddit and HN

https://www.trustmebro.reviews/r/hackernews
1•davidzweig•18m ago•0 comments

The $3.1T Commercial Real Estate Crisis [video]

https://www.youtube.com/watch?v=dWdhu3_OI2A
1•toomuchtodo•19m ago•1 comments

Asking my AI teacher how to spell seventeen

https://twitter.com/huskirl/status/2116941001335947635
2•xvxvx•20m ago•1 comments

A Brief History of Regulation and Deregulation (2018)

https://regulatorystudies.columbian.gwu.edu/brief-history-regulation-and-deregulation
1•peter_d_sherman•21m ago•0 comments

ASML's CEO is putting his paycheck on the line for employee morale

https://fortune.com/2026/10/31/asml-ceo-christophe-fouquet-executive-pay-employee-satisfaction/
1•osnium123•25m ago•1 comments

HTML Clocks

https://tudza.org/HTML_Clocks.html
1•MitPitt•25m ago•0 comments

Ask HN: Why is AWS such a pain for using Bedrock?

1•runwithdata•27m ago•0 comments

Ask HN: Has anyone vibe coded in Common Lisp? Is it even possible?

1•palad1n•32m ago•1 comments

Open Coaster: an open source web/mobile RollerCoaster Tycoon clone

https://github.com/tilework-tech/opencoaster
2•theahura•32m ago•1 comments

Nine people dead in Learjet crash in South Florida, officials say

https://www.msn.com/en-us/news/news/nine-people-dead-in-learjet-crash-in-south-florida-officials-...
4•measurablefunc•32m ago•0 comments

Tom7/noperts: Reproducible nopert proofs

https://github.com/tom7/noperts/
1•RebelPotato•33m ago•0 comments

Selected Ambient Works X Matrix

https://selectedambientworks.com/
1•bonefishgrill•33m ago•0 comments

Amdahl 470V

https://en.wikipedia.org/wiki/Amdahl_470V
2•kristianp•38m ago•0 comments

How the facial recognition blame game leaves shoppers stranded

https://www.techradar.com/vpn/vpn-privacy-security/shaking-from-head-to-toe-how-the-facial-recogn...
1•rawgabbit•39m ago•0 comments

Japan's Jimi 'Mundane' Halloween Costumes of 2026

https://spoon-tamago.com/japan-jimi-mundane-halloween-costumes-2026/
2•zdw•40m ago•0 comments

What happens when the AI money loop breaks?

https://fvdge.com/AI_Circularity_Stress_Lab.html
1•teja_nemana•41m ago•0 comments

Show HN: Arken – cryptographic identity for AI agents calling MCP servers/APIs

https://github.com/arkenforge/arken-core
2•arkenforge•41m ago•0 comments

Context as Infrastructure: Knowledge Compilation for Retrieval in Agent Harness

https://arxiv.org/abs/2610.41172
3•yingfeng•42m ago•0 comments

Yandex moves its supercomputers to new site after Ukrainian drone attacks

https://meduza.io/en/news/2026/10/26/yandex-moves-all-three-of-its-supercomputers-to-new-site-aft...
2•gnabgib•43m ago•0 comments

Learning without retention is what real intelligence needs

https://zenodo.org/records/22706328
1•shoman3003•44m ago•0 comments

Show HN: AWKLog – a minimalist Datalog interpreter in Awk

https://github.com/stass/awklog
1•stass•46m ago•0 comments

Big Tech returns smallest share of cash to shareholders in 15 years

https://www.reuters.com/legal/transactional/big-tech-returns-smallest-share-cash-shareholders-15-...
1•geox•51m ago•0 comments

This Play of Thermodynamics

https://docs.google.com/document/d/1IxOP_TW8Qut4NfDZqc_8ErPccRiS0v8veCKmgxAmVXQ/edit?tab=t.0
1•the-mitr•52m ago•0 comments