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

History of T

https://paulgraham.com/thist.html
1•tosh•54s ago•0 comments

Show HN: Window Switcher – Better same-app window switching for macOS

https://github.com/hanguokai/window-switcher
1•hanguokai•1m ago•0 comments

Oura Ring 5 Review

https://www.theguardian.com/technology/2026/jun/30/oura-ring-5-review-smart-ring-health-tracking
1•tosh•1m ago•0 comments

Show HN: Escalate – human as a service for your agent

https://escalateto.me/landing
1•oleh_vell•2m ago•0 comments

Webhookvault

https://webhookvault.onrender.com/login
1•hydra2297•2m ago•0 comments

Belgian politicians would rather risk treason charges than trust engineers

https://mikhailian.mova.org/posts/325-belgian-politicians-would-rather-risk-treason-charges-than-...
1•sam_lowry_•2m ago•0 comments

Stop the Tester's Inferiority Complex: QA and Dev Are Equals

https://medium.com/@vincent.ferreira/stop-the-testers-inferiority-complex-qa-and-dev-are-equals-9...
1•vincenfer•3m ago•0 comments

The Scanline Sweeper: A Glyph Rendering Algorithm [video]

https://www.youtube.com/watch?v=B9bztU1sTFA
1•alan665•3m ago•0 comments

Vantor's Open Satellite Feed

https://tech.marksblogg.com/vantor-satellite-imagery.html
1•marklit•4m ago•0 comments

Apple acquires Play, award-winning SwiftUI prototyping tool

https://www.cultofmac.com/news/apple-acquires-play-swiftui-app
1•terelueli•8m ago•0 comments

Show HN: WtfisMyRepo – Use Claude to understand most complex codebases in mins

https://github.com/nandnijaiswal/wtfismyrepo
2•udit_50•8m ago•1 comments

Beyond Denial How Oil Execs Shaped a Landmark Climate Study

https://www.propublica.org/article/wedges-climate-research-bp-fossil-fuel-princeton
1•_____k•10m ago•0 comments

Porting half life 2 to the browser

https://www.slqnt.dev/blog/hl2-in-web
1•QuantumNomad_•10m ago•0 comments

Show HN: Classic Minesweeper

https://guokai.dev/minesweeper/
1•hanguokai•11m ago•0 comments

China's Geely to Ship First Lotus EVs to Canada

https://www.reuters.com/world/asia-pacific/chinas-geely-ship-first-lotus-evs-canada-july-under-ca...
1•Alien1Being•17m ago•0 comments

Show HN: Mocca – A Mac email client powered by local AI

https://mocca.run/
1•brighbun•18m ago•0 comments

A Framework for Representing Knowledge – Marvin Minsky (1975) [pdf]

https://courses.media.mit.edu/2004spring/mas966/Minsky%201974%20Framework%20for%20knowledge.pdf
1•the-mitr•19m ago•0 comments

Actionable Security is Missing on the EU Horizon

https://mikhailian.mova.org/posts/326-actionable-security-is-missing-on-the-eu-horizon.html
2•sam_lowry_•19m ago•1 comments

PDP-1 Replica: The PiDP-1

https://obsolescence.dev/pdp1.html
1•kqr•19m ago•0 comments

Prime Is Not Youth, Money, or Status. It Is Something More Human

https://kanyilmaz.me/2026/03/28/prime-is-1-to-4.html
1•demiculus•19m ago•0 comments

Anthropic embedded spyware in Claude Code – and attempted to hide it from you

https://www.reddit.com/r/ClaudeCode/s/Z690c1Y9Zk
3•cromka•21m ago•0 comments

Australia's Solar Sharer: free electricity 3 hours/day starting July 1

https://www.abc.net.au/news/2026-06-29/free-electricity-solar-sharer-scheme/105999242
1•indynz•23m ago•0 comments

I built a one-time-payment alternative to subscription cloud movers

https://www.gtransfer.app
1•localappointmnt•26m ago•0 comments

Towards Understandable Software

https://gracefulliberty.com/articles/towards-understandable-software/
1•birdculture•26m ago•0 comments

Google's Whitepaper on SDLC in the Agentic Era

https://www.kaggle.com/whitepaper-the-new-SDLC-with-vibe-coding
1•shahargl•28m ago•0 comments

Good article about local LLM on MacBook Air

https://www.xda-developers.com/ollama-new-mlx-engine-local-llm-mac-twice-fast/
1•taintech•28m ago•0 comments

Show HN: Smug – single binary, dependency free session manager for tmux

https://github.com/ivaaaan/smug
1•iillexial•28m ago•0 comments

Anthropic embedded spyware in Claude Code – and attempted to hide it from you

https://old.reddit.com/r/ClaudeAI/comments/1ujila1/anthropic_embedded_spyware_in_claude_code_and/
2•theanonymousone•29m ago•0 comments

AMD Stretches Server DRAM with Flash Extended Memory

https://www.nextplatform.com/store/2026/06/29/amd-stretches-server-dram-with-flash-extended-memor...
1•rbanffy•33m ago•0 comments

Celebrating my one-year layoff anniversary

https://iiro.dev/one-year-layoff-anniversary/
2•roughike•33m ago•2 comments