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

Codex AI Agent Skill Development for UI Design and Development

https://rapidkt.com/pages/blog/codex_ai_agent_skill_development_for_ui_design_and_development
2•greenpau•2m ago•0 comments

VCupid Skills – AI Fundraising Toolkit for Founders

https://github.com/maxoliverbr/vcupid-plugin
2•maxoliverbr•5m ago•0 comments

Show HN: Verity – self-healing review gate for Claude Code

https://verity.md
3•claudiacsf•6m ago•0 comments

Ant queen lays eggs that hatch into two species (2025)

https://www.science.org/content/article/ant-queen-lays-eggs-hatch-two-species
2•indigodaddy•6m ago•0 comments

How to Set Up and Deploy an OpenClaw AI Agent on a VPS

https://3hcloud.com/blog/how-to-set-up-and-deploy-an-openclaw-ai-agent-on-a-vps
2•Liriel•7m ago•0 comments

Authorized Speed a.k.a. Ruh Roh

https://instantial.substack.com/p/authorized-speed
2•groverbennett•8m ago•0 comments

What Would C. S. Lewis Have Thought of AI?

https://chroniclesmagazine.org/web/what-would-c-s-lewis-have-thought-of-ai/
3•RickJWagner•13m ago•0 comments

High-sensitivity electro snout sniffs out unsafe food

https://newatlas.com/technology/electronic-nose-detect-spoiled-food-allergens/
3•breve•14m ago•0 comments

US at 250 – Why has the US been so successful and can it continue? [pdf]

https://assets.realclear.com/files/2026/06/2902_thematic_research_-_june_24.pdf
3•RickJWagner•14m ago•0 comments

Send OTP Codes over WhatsApp with the Telnyx Verify API

https://telnyx.com/resources/whatsapp-otp-verify-api
3•harpreetseehra•17m ago•0 comments

GCC 14.4 Released

https://gcc.gnu.org/pipermail/gcc/2026-June/248430.html
4•edelsohn•18m ago•0 comments

Exploring retro productivity software: Visual Basic on Windows 3.1

https://stonetools.ghost.io/visualbasic-win31/
3•jnord•18m ago•0 comments

BBC News uses thermal cameras to illustrate heatwave in London

https://www.bbc.co.uk/news/articles/cz9l1n4kn34o
4•xmjw•20m ago•0 comments

Show HN: NT – fly around Git worktrees from your shell

https://github.com/allisonmahmood/NT
3•Allisonmahmood•21m ago•0 comments

Scientists find evidence of hidden magma systems inside Mars

https://phys.org/news/2026-06-scientists-evidence-vast-hidden-magma.html
3•ilreb•23m ago•0 comments

Purchasing non-taxed Cannabis products carry fines now. Nova Scotia

https://news.novascotia.ca/en/2026/06/25/higher-fines-new-offences-support-safe-legal-cannabis-ma...
3•Weered•24m ago•0 comments

How we run untrusted code in Langfuse (OSS) and why we picked lambda

https://langfuse.com/blog/2026-06-22-code-evaluators-execution-model
3•marcklingen•25m ago•1 comments

Binance is leaving the EU. Here is how to move your funds

https://cyphergoat.com/binance-eu
4•4rkal•26m ago•0 comments

Everything Idiocracy Predicted That Came True [video][25 Mins]

https://www.youtube.com/watch?v=NPhYhwvMAM8
4•Bender•26m ago•0 comments

Captcha proves you're human. HATCHA proves you're not

https://github.com/mondaycom/HATCHA
35•backlit4034•27m ago•28 comments

Smart AC dial in TypeScript and CSS running natively on ESP32 [video]

https://www.youtube.com/watch?v=QRLKzxTO5hE
3•arbayi•29m ago•0 comments

The White House is asking OpenAI to slow roll the release of its new model

https://techcrunch.com/2026/06/25/the-white-house-is-asking-openai-to-slow-roll-the-release-of-it...
6•lucamark•32m ago•0 comments

From Pentagons to Pentagrams

https://johncarlosbaez.wordpress.com/2026/05/29/from-pentagons-to-pentagrams/
3•surprisetalk•33m ago•0 comments

Ask HN: Can anyone use Claude Fable 5?

5•vantareed•35m ago•1 comments

Ask HN: What makes you register on a website?

3•TheRickyRed•35m ago•2 comments

Open-source machine identity security (IAM roles outnumber humans 82:1)

https://github.com/josephtui767-cloud/MII
3•josephtui•38m ago•0 comments

Microsoft's quantum computing technology called into question, again

https://vechron.com/2026/06/microsofts-quantum-computing-technology-called-into-question-again/
3•bhartipoddar•40m ago•0 comments

The day I started believing

https://davidpoblador.com/blog/the-day-i-started-believing.html
3•nirvanis•42m ago•0 comments

Ultrasound Imaging of the Brain

https://alephneuro.com/blog/ultrasound-brain
4•rossant•42m ago•0 comments

After the Rent Freeze

https://phenomenalworld.org/analysis/after-the-rent-freeze/
2•mjbellantoni•43m ago•1 comments