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

Show HN: Capture Go board positions with a browser extension

https://play.goshawk.cc/gsx/index.html
1•h3mm3•5m ago•0 comments

In 2026 T-Mobile gives me an IPv6 /64 without prefix delegation

https://github.com/bradleypeabody/myispsucksv6
1•bradpeabody•7m ago•0 comments

The consequences of relying on AI for accurate news

https://news.mit.edu/2026/consequences-of-relying-on-ai-for-accurate-news-0609
1•droidjj•7m ago•0 comments

Mythos/Fable intentionally hinders requests involving AI Research Development

https://twitter.com/eliebakouch/status/2064399902684139852
1•behnamoh•11m ago•0 comments

Trump Expands Glyphosate, and Now the MAHA Moms Who Elected Him Are Done

https://www.ibtimes.co.uk/trump-glyphosate-order-backlash-1801442
1•smnthermes•14m ago•0 comments

SpaceX IPO demand is approaching four times oversubscribed

https://www.reuters.com/world/spacex-ipo-demand-is-approaching-four-times-oversubscribed-source-s...
1•ironyman•14m ago•0 comments

What is the sea drone that rescued US helicopter crew?

https://www.reuters.com/world/middle-east/five-facts-sea-drones-after-us-helicopter-rescue-2026-0...
2•JumpCrisscross•15m ago•0 comments

Nvidia CUDA Python 1.0 and CUDA 13.3 Release

https://developer.nvidia.com/blog/nvidia-cuda-13-3-enhances-gpu-development-with-tile-programming...
1•ashvardanian•15m ago•0 comments

Open Source Agent, Harness-1, Outperforms GPT-5.4 on Recall

https://venturebeat.com/orchestration/researchers-trained-an-open-source-ai-search-agent-harness-...
2•somewhatrandom9•16m ago•0 comments

Fable 5 remotion video benchmark and examples

https://mesmer.tools/benchmarks/ai-video-generation
3•mesmertech•17m ago•1 comments

Create WhatsApp screenshots from a 3D phone model

https://www.getmockly.com/chats/whatsapp
2•eRzy•17m ago•0 comments

Show HN: A minimal linear algebra library in pure Go

https://github.com/igomez10/linearalgebra
2•igomeza•17m ago•0 comments

Show HN: Elah – A browser-native, frame-accurate video editor

https://github.com/elahlabs/elah
2•paulSpaurgen•20m ago•0 comments

I Replaced a $144/Year App in <2 Hours. The Moat Was Never There

https://substack.com/@vmysla/p-197723867
1•vmysla•25m ago•0 comments

The contract that could get you FIRED (lexploit)

https://www.legalquants.com/blog/the-contract-that-could-get-you-fired
1•SaifAlYounan•25m ago•0 comments

Trump is becoming Jimmy Carter

https://www.ft.com/content/c6e506e0-4b95-437b-8fad-ac436a71c3de
3•GreenSalem•28m ago•1 comments

My side of the jqwik anti AI logging drama

https://blog.johanneslink.net/2026/06/09/the-jqwik-anti-ai-affair/
2•phoronixrly•32m ago•1 comments

Claude Fable 5: the first public Mythos-class model

https://artificialanalysis.ai/articles/claude-fable-5-mythos
3•Topfi•33m ago•0 comments

If Claude Fable stops helping you, you'll never know

https://jonready.com/blog/posts/claude-fable5-is-allowed-to-sabotage-your-app-if-youre-a-competit...
9•mips_avatar•34m ago•3 comments

Claude Fable 5 will sabotage "frontier LLM research" tasks

https://twitter.com/i/status/2064399902684139852
5•qwertyforce•37m ago•1 comments

Flathub disallows LLM-based submissions

https://social.treehouse.systems/@barthalion/116657011366876079
3•birdculture•40m ago•0 comments

I built a BNB Chain liquidity sniper bot and it proved a losing game

https://e-mahmoudi.me/blog/i-built-a-liquidity-sniper-bot-for-bnb-chain-and-it-proved-a-losing-game/
3•jeyem•41m ago•0 comments

I Stress-Tested Claude Mythos [video]

https://www.youtube.com/watch?v=t5xKkn8JXMM
1•bmahir22•41m ago•0 comments

Ask HN: Are you using a serverless SQL database?

1•dzonga•41m ago•0 comments

When production is infinite, judgment becomes the bottleneck

https://tasteisnotagift.com/
2•dilipkj•45m ago•0 comments

Just Be Normal About Things

https://www.joanwestenberg.com/p/just-be-normal-about-st
3•spking•45m ago•0 comments

Exif Smuggling

https://github.com/signalblur/exifsmugglingpoc
12•rolph•47m ago•3 comments

The Most Surprising Economic Success Story Is North Korea

https://www.wsj.com/world/asia/north-korea-economy-success-e80f7062
2•karakoram•47m ago•2 comments

What studying animals teaches us about toxic work environments

https://theconversation.com/predators-and-prey-what-studying-animals-teaches-us-about-toxic-work-...
2•PaulHoule•47m ago•0 comments

Show HN: LocalCode – turn plain English into CLI commands with Apple's local AI

https://github.com/localcodeai/localcode
2•rahlokzero•49m ago•0 comments