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

AI Threatens the Giants of Consulting

https://www.ft.com/content/d82d2a5c-74ab-4eb9-a658-fd5467e71670
1•uxhacker•19s ago•0 comments

SWE Tasks Doable by AI

https://www.signalbloom.ai/posts/why-task-proficiency-doesnt-equal-ai-autonomy/
1•abrbhat•48s ago•0 comments

Automations I built to help manage ADHD

https://0xff.nu/automating-adhd/
1•hxii•1m ago•1 comments

Is grep all you need? Lexical VS Sematic Search for Agents

https://www.llamaindex.ai/blog/is-grep-all-you-need-lexical-vs-sematic-search-for-agents
1•aledevv•5m ago•0 comments

Agent-workspace-Linux An isolated Linux desktop that an AI agent control

https://github.com/agent-sh/agent-workspace-linux
1•anotherCodder•6m ago•0 comments

Nvidia Vera CPU Benchmarks: Olympus Cores Delivering Great Performance

https://www.phoronix.com/review/nvidia-vera-benchmarks
2•naves•9m ago•0 comments

Daves Compendium of Level Select Screens

http://www.davetech.co.uk/gamedevlevelselect
1•frogulis•9m ago•0 comments

All of human cooking compressed into 2 megabytes

https://arxiv.org/abs/2605.22391
1•josefchen•10m ago•0 comments

EU to favour European satellite services to prevent Musk's Starlink expansion

https://www.euronews.com/my-europe/2026/05/26/eu-to-favour-european-satellite-services-to-prevent...
1•vrganj•11m ago•0 comments

Show HN: TokenAdvisor – paste a prompt, see what to cut to lower your LLM bill

https://tokenadvisor.dev/
2•Emadiali83•12m ago•1 comments

I tracked down the thief who stole $200k of Lego [video]

https://www.youtube.com/watch?v=wscQpkcwgNU
1•Titan2189•14m ago•1 comments

Fighting the AI Scraperbot Scourge

https://lwn.net/Articles/1008897/
1•prakashqwerty•14m ago•0 comments

The Untold Story About W Social

https://blog.elenarossini.com/the-untold-story-about-w-social-unconventional-beginnings-strategic...
1•worik•19m ago•0 comments

Tool-schema compression enables agentic RAG under constrained context budgets

https://arxiv.org/abs/2605.26165
1•Sakizli•19m ago•0 comments

How to Make Sure AI Doesn't Spy on Us or Kill Innocent People

https://reason.com/video/2026/05/26/how-to-make-sure-ai-doesnt-spy-on-us-or-kill-innocent-people/
1•rendall•24m ago•0 comments

Monitor your store and competitors automatically

https://beaconmon.com
1•haimanotgetu•27m ago•1 comments

Career Evolution Simulator

https://www.tooldocket.com/2026/05/career-evolution-simulator.html
1•stoicstoic•27m ago•0 comments

Show HN: YouTube MCP – let your AI agent search YouTube for research

https://github.com/ZeroPointRepo/youtube-mcp
1•therohitdas•28m ago•0 comments

Windows' classic 3D Space Cadet pinball is getting a physical re-creation

https://arstechnica.com/gaming/2026/05/windows-classic-3d-space-cadet-pinball-is-getting-a-physic...
1•naves•28m ago•0 comments

An LLM Flies X-Plane [video]

https://www.youtube.com/watch?v=UiXcLURL7yo
1•marklit•29m ago•0 comments

How sure is the activation oracle?

https://arxiv.org/abs/2605.26045
1•evilscript•29m ago•0 comments

Anthropic's Dogma on US-China AI Competition

https://chinai.substack.com/p/anthropics-dogmatic-views-on-us-china
2•pretext•29m ago•1 comments

Claude, Author of the Humanitas

https://www.lesswrong.com/posts/wRNJZz2iYrfDaSDdz/claude-author-of-the-humanitas
1•doener•31m ago•0 comments

From Chatbot to Agentic Endpoint, and Beyond

https://yy8402.github.io/blog/agentic-ai-workspace/
1•yy8402•32m ago•0 comments

Why science is becoming less innovative

https://economist.com/graphic-detail/2026/05/25/why-science-is-becoming-less-innovative
3•andsoitis•32m ago•0 comments

Human Proof for FOSS Contributions

https://dillo-browser.org/lab/human-proof/
1•LaSombra•33m ago•2 comments

Spotify CEO defends AI music, wants you to stop calling it 'slop'

https://www.neowin.net/news/spotify-ceo-defends-ai-music-wants-you-to-stop-calling-it-slop/
5•bundie•33m ago•2 comments

Rethinking the Gnome Clipboard Issues

https://edu4rdshl.dev/posts/rethinking-the-gnome-clipboard-issues/
2•LaSombra•34m ago•0 comments

Why The Pentagon Went to War with Anthropic – ReasonTV [video]

https://www.youtube.com/watch?v=O1EWjfGBkmc
1•rendall•35m ago•0 comments

Even (very) noisy LLM evaluators are useful for improving AI agents

https://www.tensorzero.com/blog/even-very-noisy-llm-evaluators-are-useful-for-improving-ai-agents/
2•GabrielBianconi•35m ago•0 comments