frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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

Amazon Vinyl, a TypeScript streaming engine for HTML5 media

https://amazonmusic.github.io/vinyl/
1•nbilyk•6m ago•0 comments

Pre-Modern Armies for Worldbuilders, Part I: Why They Fight

https://acoup.blog/2026/06/05/collections-pre-modern-armies-for-worldbuilders-part-i-why-they-fight/
1•gostsamo•13m ago•0 comments

Claude-tinderbox: Search your Claude.ai conversation history locally via MCP

https://github.com/luckyrmp/tinderbox-archive
1•songwavepst•15m ago•0 comments

Bitcoin's star fades, as investors flock to lustre of AI and megacap IPOs

https://www.reuters.com/business/finance/bitcoins-star-fades-investors-flock-lustre-ai-megacap-ip...
2•1vuio0pswjnm7•17m ago•0 comments

Central Ohio Becomes Hub for Tech and Manufacturing

https://www.nytimes.com/2026/06/05/business/ohio-tech-manufacturing-hub.html
1•saikatsg•17m ago•0 comments

Language models transmit behavioural traits through hidden signals in data

https://www.nature.com/articles/s41586-026-10319-8
1•bushwart•18m ago•0 comments

Lockdown Mode

https://help.openai.com/en/articles/20001061-lockdown-mode
9•berlianta•19m ago•3 comments

Ubuntu 26.10 to Begin Laying Foundation for Context-Aware Desktop

https://www.phoronix.com/news/Ubuntu-26.10-Desktop-Features
2•dabinat•20m ago•0 comments

Show HN: Nimbril – 12 file tools that never upload (airplane-mode test)

https://nimbril.com
1•yapancha•20m ago•0 comments

Bitcoin cracks $60k, sinking to lowest level since October 2024

https://www.cnbc.com/2026/06/05/bitcoin-dismal-week-price-below-all-time-high-crypto-investors.html
2•1vuio0pswjnm7•23m ago•0 comments

MIT's Dr Fink got Sakharov Prize for defending human rights of scientists in US

https://www.aps.org/funding-recognition/prize/andrei-sakharov
1•osnium123•23m ago•1 comments

Costco sells such cheap gas

https://www.cnn.com/2026/05/31/business/costco-cheap-gas
3•Bender•26m ago•0 comments

Yet another Cisco SD-WAN 0-day under attack, and no patch in sight

https://www.theregister.com/security/2026/06/05/yet-another-cisco-sd-wan-0-day-under-attack-and-n...
2•Bender•27m ago•0 comments

C++: The Programming Language back cover raises questions not answered by front

https://devblogs.microsoft.com/oldnewthing/20260605-01/?p=112391
2•paulmooreparks•31m ago•0 comments

Quest 3 Accessory Turns Brain Activity into VR Avatar Control

https://roadtovr.com/quest-accessory-bci-brain-activity-avatar-control/
2•LorenDB•34m ago•0 comments

I turned a $59 Android phone into a self-healing cloud engine (Axiom SDK)

https://github.com/liberatedai-ui/axiom-sdk-wrapper
1•liberatedai•35m ago•0 comments

Scarcity is driving AI innovation outside Silicon Valley

https://restofworld.org/2026/scarcity-is-driving-ai-innovation-outside-silicon-valley/
3•i7l•40m ago•0 comments

The Fix for AI's Spending Problem Is Not Good for OpenAI and Anthropic [video]

https://www.youtube.com/watch?v=w1yB7ck36JA
1•mgh2•42m ago•0 comments

Starling – Managed-first .NET web browser engine, built from primitives

https://starlingbrowser.com
2•bj-rn•48m ago•0 comments

Show HN: NEP – Ethereum JSON-RPC transform that beats ZSTD by 12%

https://github.com/Louw115/nep-ethereum-compression
1•LBWasserman•54m ago•1 comments

The Future of Film May Just Be Old Movies (2024)

https://www.theringer.com/2024/10/23/movies/repertory-revival-cinema-old-movie-screenings-vidiots...
1•cocacola1•58m ago•0 comments

Thinking more about Netscape Time

https://thehistoryoftheweb.com/thinking-more-about-netscape-time/
1•Brajeshwar•1h ago•0 comments

The Stochastically K Shaped Job Market

https://www.williamangel.net/blog/2026/06/05/the-stochastically-k-shaped-engineering-job-market.html
1•datadrivenangel•1h ago•1 comments

Silicon Valley's Secretive, Orgiastic Dark Side (2018)

https://www.vanityfair.com/news/2018/01/brotopia-silicon-valley-secretive-orgiastic-inner-sanctum
2•mgh2•1h ago•0 comments

Getting silly with C, part and((int*)1)[-1]

https://lcamtuf.substack.com/p/getting-silly-with-c-part-and-int1
3•surprisetalk•1h ago•0 comments

Show HN: Backup Your Perplexity Research to Markdown and Obsidian

https://chatgpt2notion.com/products/perplexity-to-obsidian/
1•chatgpt2notion•1h ago•0 comments

Show HN: Zedra – Mobile control plane for AI coding agents

1•tanlethanh•1h ago•1 comments

Ask HN: Why is the HN crowd so anti-AI?

19•Ekami•1h ago•34 comments

Definitive guide for creating skill.md for your tools

https://docsalot.dev/blog/what-is-skill-md
1•fazkan•1h ago•0 comments

Agent-ML-skills – Teach Codex/Claude/Cursor to stop making ML mistakes

https://github.com/param087/agent-ml-skills
1•param087•1h ago•0 comments