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

Gaze-Enhanced User Interface Design

https://hci.stanford.edu/publications/paper.php?id=178
1•andsoitis•26s ago•0 comments

Show HN: Plastron – A spreadsheet you grow into an app, in one index.html

https://plastron.ca/
1•rheohile10•56s ago•0 comments

Show HN: Claw Patrol, a security firewall for agents

https://github.com/denoland/clawpatrol
1•rough-sea•1m ago•0 comments

Why UI is often the bottleneck in enterprise system modernization

https://www.htmlelements.com/smart-ui-announces-strategic-partnership-with-resolute-software-to-a...
1•boikom•1m ago•0 comments

CodeGraph, read against its own SQLite index

https://harrisonsec.com/blog/codegraph-architecture-first-principles-llm-retrieval/
1•gzxharrison001•1m ago•0 comments

Trump's new AI order – hallucinations aren't just for LLMs

https://www.computerworld.com/article/4182531/trumps-new-ai-order-hallucinations-arent-just-for-l...
1•CrankyBear•2m ago•0 comments

My New Coworker Is an AI Agent with Its Own Computer

https://www.hauser.io/i-gave-an-ai-agent-its-own-computer-and-it-changed-how-i-see-the-future-of-...
1•bkfh•2m ago•0 comments

My thoughts after spending all day with Mythos

https://twitter.com/zekramu/status/2064131568495677490
1•MrBuddyCasino•3m ago•0 comments

Calling fsincos instruction in LLVM slower than calling Libc sin/cos functions

https://stackoverflow.com/questions/12485190/calling-fsincos-instruction-in-llvm-slower-than-call...
2•tosh•3m ago•0 comments

Stochastic KV Routing: Enabling Adaptive Depth-Wise Cache Sharing

https://arxiv.org/abs/2604.22782
1•PaulHoule•6m ago•0 comments

Active Recall

https://herman.bearblog.dev/active-recall/
1•HermanMartinus•6m ago•0 comments

Show HN: AI-native red-team for penetration testing and vulnerability research

https://github.com/yv1ing/Z3r0
1•yv1ing•7m ago•0 comments

'Sloppenheimer:' Amazon Employees Mock the Company's AI on Slack

https://www.404media.co/sloppenheimer-amazon-employees-mock-the-companys-ai-on-slack/
4•doener•8m ago•0 comments

VShow HN: CLI Market – Commerce infrastructure for AI agents (38 rets, 8 counts)

https://cli-market.dev
1•cli-market•8m ago•0 comments

Ask HN: How to track micro changes with coding agent?

1•vedhant•9m ago•0 comments

How to Make Your Payload CMS Site AI-Ready in 2026

https://focusreactive.com/blog/making-your-payload-cms-site-ai-ready-right-now/
1•katyadrozd•10m ago•0 comments

Loose American flag knocks out power to thousands in Stamford, Greenwich CT

https://www.ctinsider.com/news/article/more-1k-power-ct-amid-thunderstorms-22294395.php
1•randycupertino•10m ago•0 comments

Blackstone, Anthropic Joint Venture Acquires Fractional AI

https://www.morningstar.com/news/dow-jones/202605217686/blackstone-anthropic-joint-venture-acquir...
1•wslh•11m ago•0 comments

Pyodide 314.0: Python packages can now publish WebAssembly wheels to PyPI

https://blog.pyodide.org/posts/314-release/
1•agriyakhetarpal•13m ago•0 comments

Hiding the sidebar toggle under your logo is NOT a good idea

https://grumpy.website/1778
2•puttycat•13m ago•0 comments

Library of Congress Storage Architecture Meeting 2026

https://blog.dshr.org/2026/06/library-of-congress-storage.html
1•vitplister•13m ago•0 comments

New plans to stop children taking, sharing or viewing nude images

https://www.gov.uk/government/news/new-plans-to-stop-children-taking-sharing-or-viewing-nude-images
4•hamilyon2•15m ago•1 comments

Central Europe is not Eastern Europe

https://bare.systems/posts/central-europe/
1•6jQhWNYh•15m ago•0 comments

AI Influencers Now Indistinguishable from Real Creators

https://www.techbuzz.ai/articles/ai-influencers-now-indistinguishable-from-real-creators
1•Vaslo•16m ago•0 comments

White House sends Blanche's Attorney General nomination to Congress

https://www.politico.com/live-updates/2026/06/08/congress/todd-blanche-attorney-general-nominatio...
1•embedding-shape•16m ago•0 comments

I built a local TypeScript guardrail for AI agent cost failures

https://github.com/salimassili62-afk/ai-costguard
1•salim2006•18m ago•0 comments

Beyond Dexterity: Why Contact May Define the Next Era of Robotics

https://spectrum.ieee.org/agilink-contact-intelligence-robot-manipulation
1•Brajeshwar•19m ago•0 comments

Apple's New AI Models Contain 'None' of Google's Gemini Assistant

https://www.macrumors.com/2026/06/09/apples-new-ai-contains-no-gemini/
1•bound008•20m ago•0 comments

React Native Windows v0.83 is here

https://devblogs.microsoft.com/react-native/%f0%9f%9a%80react-native-windows-v0-83-is-here/
3•soheilpro•21m ago•0 comments

Two Types of Bureaucracy: Enabling and Coercive

https://lozeve.com/posts/types-of-bureaucracy-enabling-and-coercive
1•mooreds•22m ago•0 comments