frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•8mo 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•8mo 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•8mo 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).

Best AI Training Platforms of 2026: Ranked and Reviewed

https://aitrainer.work/guides/best-ai-training-platforms-reviewed
2•xceladonx•8m ago•0 comments

Mastra

https://mastra.ai/
1•blufish•8m ago•1 comments

IN Memory of Professor Emeritus Benedict Gross

https://www.math.harvard.edu/in-memory-of-professor-emeritus-benedict-gross/
1•tzury•10m ago•0 comments

AeroSpace is an i3-like tiling window manager for macOS

https://github.com/nikitabobko/AeroSpace
1•y1n0•10m ago•0 comments

The 'untouchable hacker god' behind Finland's biggest ever crime

https://www.theguardian.com/technology/2026/jan/17/vastaamo-hack-finland-therapy-notes
2•c420•10m ago•0 comments

Escape from Woomera

https://en.wikipedia.org/wiki/Escape_from_Woomera
2•viraptor•11m ago•0 comments

AI Contribution Policy

https://www.graphite.art/volunteer/guide/starting-a-task/ai-contribution-policy/
1•jruohonen•14m ago•0 comments

Kip: A programming language based on grammatical cases of Turkish

https://github.com/joom/kip
1•todsacerdoti•14m ago•0 comments

L-Systems: an exploration in Swift [video]

https://vimeo.com/1155453426
1•Austin_Conlon•17m ago•0 comments

AI friend- Brought to you by your friendly neighborhood mega corporation

https://gpt3experiments.substack.com/p/your-ai-friend-brought-to-you-by
1•nutanc•18m ago•1 comments

Ask HN: Should Developers Shift from Coding to Architecture in the LLM Era?

2•danver0•29m ago•2 comments

Meta delays international launch of Ray-Ban Display due to U.S. demand surge

https://techfusiondaily.com/meta-delays-ray-ban-display-international-launch-us-demand-surge/
1•nelkazzu•32m ago•0 comments

25 Years of Wikipedia

https://wikipedia25.org/en/
1•atulatul•34m ago•1 comments

Everything Is a Ralph Loop

https://ghuntley.com/loop/
1•ghuntley•37m ago•0 comments

Little red dots as young supermassive black holes in dense ionized cocoons [pdf]

https://www.nature.com/articles/s41586-025-09900-4
2•thunderbong•44m ago•0 comments

Politics and the English Language (1946) [pdf]

https://bioinfo.uib.es/~joemiro/RecEscr/PoliticsandEngLang.pdf
2•dvrp•45m ago•0 comments

U.S. freezes visas to 75 countries

https://www.kenklippenstein.com/p/trump-freezes-visas-to-75-countries
1•0x54MUR41•48m ago•1 comments

A Data Model for Git

https://jvns.ca/blog/2026/01/08/a-data-model-for-git/
2•vismit2000•48m ago•0 comments

Why is "Am I the asshole" always popular on Reddit

1•jaskirat1216•49m ago•2 comments

The New Food-Stamp Rules Will Make Your Head Spin

https://www.theatlantic.com/health/2026/01/snap-soda-ban-food-stamps/685637/
1•JumpCrisscross•50m ago•1 comments

Dps

https://engineering.fb.com/2019/08/15/security/zoncolan/
1•JohnCorey•54m ago•1 comments

Show HN: AudiobookHub – Blinkist-style summaries and full classics

https://www.audiobookhub.net/
1•baoyashishui•54m ago•2 comments

Something Is Wrong with Russia's Children

https://www.theatlantic.com/international/2026/01/russia-children-violence-war/685635/
1•JumpCrisscross•59m ago•0 comments

China blocks Nvidia H200 AI chips that US Government cleared for export – report

https://www.theguardian.com/technology/2026/jan/17/china-blocks-nvidia-h200-ai-chips-that-us-gove...
4•sorokod•59m ago•0 comments

Fatberg the size of 4 buses likely birthed poo balls that closed Sydney beaches

https://www.theguardian.com/australia-news/2026/jan/17/fatberg-poo-balls-sydney-beaches-malabar-o...
3•ljf•1h ago•0 comments

YouTube relaxes monetization policy on videos with controversial content

https://apnews.com/article/youtube-monetization-update-policy-controversial-issues-545e27e27e26e0...
1•01-_-•1h ago•0 comments

FestiveEcho

https://github.com/StnkRB/Chrome-Extension-X-AutoComment
1•rahulbootstrap•1h ago•1 comments

ClickHouse valued at $15B as database analytics firm rides AI wave

https://www.reuters.com/technology/database-management-firm-clickhouse-valued-15-billion-amid-ai-...
1•shadow28•1h ago•0 comments

True story of the 1916 hanging of Murderous Mary, a circus elephant

https://www.themoonlitroad.com/murderous-mary-the-elephant/
2•joebig•1h ago•1 comments

Show HN Rundown transforms docs into executable workflows

https://rundown.cool/
1•tobyhede•1h ago•0 comments