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 Keychain CVE Where Every Key Fits

https://boberito.medium.com/the-keychain-cve-where-every-key-fits-055f377618be
1•lapcat•1m ago•0 comments

GPT Seinfeld Inference on Browser

https://gpt-seinfeld.vercel.app
1•kekqqq•3m ago•0 comments

Rational CyberIntel Newsletter

https://readinsec.substack.com/
1•elsadek•3m ago•0 comments

Show HN: Taomus – The Atlas of Music

https://taomus.com/
1•Saliroz•7m ago•0 comments

Trust is all you need

https://r5d.me/trust-and-the-lack-thereof/
1•solaire_oa•8m ago•0 comments

Prolog JITI Amazing

1•lokinpendawa•9m ago•0 comments

Stanford just released 1000+ system prompts from ChatGPT, Claude etc.

https://systempromptindex.ai/
1•randomdog•9m ago•0 comments

Predictions for the Era of Continual Learning

https://www.dwarkesh.com/p/era-of-continual-learning
1•gmays•10m ago•0 comments

Oracle bans AI-generated code from OpenJDK

https://app.dealroom.co/news/feed/oracle-bans-ai-generated-code-from-openjdk-despite-ellison-s-cl...
2•delduca•11m ago•0 comments

DeepSeek V4 Flash on ARC-AGI

https://twitter.com/arcprize/status/2085779238007808349
1•tosh•11m ago•0 comments

Show HN: Check if any of the $656M in unclaimed royalties at The MLC is yours

https://pub.doub.ly/
1•knaught•12m ago•1 comments

Effect

https://www.effect.website/
1•tosh•13m ago•0 comments

X wants to keep suing advertisers, asks 5th Circuit to overrule district judge

https://arstechnica.com/tech-policy/2026/08/elon-musks-x-isnt-done-suing-advertisers-asks-court-t...
3•howard941•13m ago•0 comments

Show HN: DayOtter – open-source, self-hostable scheduling assistant you talk to

https://github.com/Dayotter/dayotter
1•archits1996•14m ago•1 comments

Show HN: FLUX.3 Video 1k generation test (180 mins of footage)

https://www.martini.film/p/35b02ee5-2488-4dc6-a9d9-c403211cfede/flux-3-15ryn2n
1•niwrad•14m ago•0 comments

Call Stack Diffs

https://oskrim.github.io/engineering/2026/08/02/call-stack-diffs.html
1•mpweiher•16m ago•0 comments

Ask HN: In your experience, what are sound conventions for e-ink UI development?

1•BoxOfRain•18m ago•0 comments

Music to confuse AI might be the next new genre

https://cdm.link/music-to-confuse-ai-might-be-the-next-new-genre/
1•wyclif•19m ago•0 comments

Autoresearch for Hardware

https://www.onyxresearch.ai
1•tedlutkus•20m ago•1 comments

Make WordArt Online

https://wordart97.net/
1•choult•20m ago•0 comments

To Save C, We Must Save ABI

https://thephd.dev/to-save-c-we-must-save-abi-fixing-c-function-abi
2•jackwilsdon•22m ago•0 comments

City That Arrested Clapper at Data Center Meeting Goes Virtual for 'Safety'

https://www.404media.co/city-that-arrested-person-for-clapping-at-data-center-meeting-moves-to-vi...
2•cdrnsf•23m ago•2 comments

Show HN: Merge – AI-native code review assessments for engineering hiring

https://mergeoa.com
4•harshithl1777•26m ago•1 comments

HarnessOpt-Bench: Evaluating LLMs at Harness Optimization

https://arxiv.org/abs/2608.06301
3•wslh•27m ago•0 comments

Tell HN: Tally Data Breach

6•gregsadetsky•31m ago•1 comments

Coding agents, defaults, and human judgment

https://rpc3.dev/posts/coding-agents-defaults-and-human-judgment/
2•rpc3•32m ago•0 comments

parakeet.wgsl – Fast, accurate ASR in the browser, via raw WebGPU and SIMD WASM

https://parakeet.narcotic.sh/
2•hamza_q_•34m ago•1 comments

The Two-Year-Old Firefox ARM64 Video Bug

https://fratellobigio.com/posts/the-two-year-old-firefox-arm64-video-bug/
3•fratellobigio•35m ago•0 comments

Big tech's AI-powered 'pervert' glasses are in a losing battle with DuckDuckGo

https://www.sfgate.com/tech/article/duckduckgo-sunglasses-22377693.php
3•wyclif•35m ago•2 comments

Why are Japan's luxury night trains making a comeback?

https://www.nippon.com/en/japan-topics/g02623/
3•whiteblossom•38m ago•0 comments