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

US Military personnel are reportedly being targeted using location data

https://www.reuters.com/business/media-telecom/pentagon-says-us-military-personnel-are-reportedly...
1•geox•1m ago•0 comments

Canopy Guard – Free audit tool: 47 signals across SEO, AEO, GEO

https://www.thecanopyguard.com/
1•adammcclarin•1m ago•0 comments

Cloudflare's data platform and the AI agent on top of it

https://blog.cloudflare.com/our-unified-data-platform/
1•jgrahamc•2m ago•0 comments

SIE: Unified Inference Engine for Embeddings, Reranking, and Extraction

https://github.com/superlinked/sie
1•modinfo•3m ago•0 comments

Project Lightwell: Securing the open source supply chain

https://www.redhat.com/en/lightwell
2•my2c•4m ago•0 comments

Google Hates You

https://www.sfgate.com/tech/article/new-google-ai-22279112.php
4•speckx•7m ago•0 comments

Just Use Postgres for Durable Workflows

https://www.dbos.dev/blog/postgres-is-all-you-need-for-durable-execution
3•KraftyOne•7m ago•0 comments

Hank Green: How to Fix the Internet

https://time.com/article/2026/05/07/how-to-fix-the-internet/
2•cpeterso•8m ago•0 comments

Qwen vs. Proust: Injecting novels into a local model's prompt

https://robertkarl.net/blog/2026/May/28/qwen-vs-proust-injecting-entire-novels-into-a-local-model...
2•robertkarl•11m ago•0 comments

Show HN: AI IDE that converts websites and designs into code

https://velork.com
1•aliadelelroby•11m ago•1 comments

The A16Z FDE Fellowship

https://www.a16z.news/p/introducing-the-a16z-fde-fellowship
1•Zhenya•11m ago•0 comments

DNS: A Replacement for Finger

https://blawg.nochan.net/b/Internet-Crap/20260527-DNS-A-Replacement-For-Finger/
2•Bender•14m ago•0 comments

Kenosis – Quantize ONNX models without breaking kernel fusion

https://github.com/CoreEpoch/kenosis
1•CoreEpoch•15m ago•1 comments

What it's like to have your insulin pump die while you're on vacation

https://blog.lauramichet.com/what-its-like-to-have-the-machine-that-keeps-you-alive-die-while-you...
2•speckx•15m ago•0 comments

Build Personal Web Applications

https://blog.roastidio.us/posts/personal_web_application/
2•derekzhouzhen•15m ago•1 comments

Show HN: A CSP header scanner that explains what's unsafe

https://cspradar.com/tools/csp-scanner
1•Lasek•17m ago•0 comments

How do you catch AI agent regressions after prompt or model changes?

1•1taimoorkhan0•18m ago•0 comments

Show HN: LINQ CLI – an iMessage API you can use from the command line

https://linqapp.com/cli
7•patsully88•18m ago•2 comments

Show HN: Bootstrap a team of coding agents from a template, OSS

https://github.com/awebai/aweb-team-coord-worktrees
2•juanre•19m ago•0 comments

Show HN: I built an autonomous cofounder for my side projects

https://www.iterationmachine.com/
2•sarbak•20m ago•0 comments

Incorruptible: Why Good Companies Go Bad and How Great Companies Stay Great

https://www.incorruptible.co
2•tcumulus•20m ago•1 comments

PostHog training on end-users; Indie Alternatives?

3•mrr7337•20m ago•2 comments

libffi: A portable foreign-function interface library

https://github.com/libffi/libffi
3•tosh•21m ago•0 comments

Show HN: Agmsg – let Claude Code and Codex message each other (bash and SQLite)

https://github.com/fujibee/agmsg
3•fujibee•22m ago•0 comments

A CS researcher's unusually high h-index exposes an expansive citation network

https://retractionwatch.com/2026/05/27/h-index-citation-networks-retractions-special-issues/
3•leephillips•24m ago•1 comments

SecOpsium – Security validation for dev teams without a security engineer

https://secopsium.com
2•Wael_Matoussi•25m ago•0 comments

MAME 0.288

https://www.mamedev.org/?p=564
2•chungy•25m ago•0 comments

Our Military Is Built for the Wrong Century

https://www.nytimes.com/2026/05/28/opinion/military-iran-ukraine-russia-war-drones.html
4•Teever•27m ago•0 comments

About LLMs at Zig Days

https://kristoff.it/blog/llms-at-zig-days/
4•kristoff_it•28m ago•1 comments

The Cursor Developer Habits Report

https://cursor.com/insights
3•gk1•29m ago•0 comments