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 based Software Testing system that works

https://ytest.ai/
1•mchauhanx•8s ago•0 comments

The Attack on Competence

https://deadsimpletech.com/blog/attack-on-competence
1•lproven•1m ago•0 comments

OpenAI's Altman says AI unlikely to lead to 'jobs apocalypse'

https://www.reuters.com/world/asia-pacific/openais-altman-says-ai-unlikely-lead-jobs-apocalypse-2...
1•cdrnsf•1m ago•0 comments

The Finite Work Fallacy – Off-Square

https://offsquare.substack.com/p/the-finite-work-fallacy
1•fkodom•1m ago•0 comments

Superintelligence: The Idea That Eats Smart People (2016)

https://idlewords.com/talks/superintelligence.htm
1•thoughtpeddler•7m ago•0 comments

I Built a Thing

https://github.com/tylrcc/tapeline
2•tylrr•8m ago•0 comments

Stop AI agents from being weaponized through their own memory (OWASP)

https://www.helpnetsecurity.com/2026/06/01/owasp-agent-memory-guard/
2•vgudur297•9m ago•0 comments

Fourth Grade Product Thinking

https://brentfitzgerald.com/posts/fourth-grade-product-thinking/
2•_doctor_love•9m ago•1 comments

Build a Basic AI Agent from Scratch: Tools

https://www.ruxu.dev/articles/ai/build-an-ai-agent-with-tools/
2•ruxudev•10m ago•0 comments

Virtual File Tree VSCode Extension for Developers

https://codeberg.org/hjdesulme/virtual-file-tree
2•hdell49•10m ago•1 comments

NYT Publisher: A.I., Journalism and the Uncertain Future of the Public Square

https://www.nytco.com/press/a-i-journalism-and-the-uncertain-future-of-the-public-square/
2•tysone•11m ago•0 comments

Should you normalize RGB values by 255 or 256?

https://30fps.net/pages/255-vs-256-division/
4•pplanu•13m ago•0 comments

Emergence World: A Laboratory for Evaluating Long-Horizon Agent Autonomy

https://www.emergence.ai/blog/emergence-world-a-laboratory-for-evaluating-long-horizon-agent-auto...
2•amai•15m ago•0 comments

I Hate the Weekends (2017)

https://www.cdahmedeh.net/blog/2017/4/15/why-i-hate-the-weekends
2•downbad_•16m ago•0 comments

I Observed Some Brownian Motion at Home

https://chillphysicsenjoyer.substack.com/p/i-observed-some-brownian-motion-at
2•crescit_eundo•16m ago•0 comments

Is Huh? a universal word? (2013)

https://markdingemanse.net/huh/
2•downbad_•16m ago•0 comments

Amazon Shuts Down Internal AI Leaderboard After Employees Cheated

https://www.404media.co/amazon-shuts-down-internal-ai-leaderboard-after-employees-cheated/
3•cdrnsf•18m ago•3 comments

Hackers Asked Meta AI to Give Them Access to Instagram Accounts. It Worked

https://www.404media.co/hackers-simply-asked-meta-ai-to-give-them-access-to-high-profile-instagra...
6•pulisse•19m ago•1 comments

Show HN: Trumpstonks – every company Trump's named, backtested vs. the S&P

https://www.trumpstonks.com/
2•racketracer•20m ago•1 comments

Show HN: Make a free 3.8B model as reliable as one 7× bigger at parsing data

https://pypi.org/project/llm-feedback-control/
2•pcoz•22m ago•0 comments

Sloppy and Paste

https://wordsrightman.beehiiv.com/p/sloppy-and-paste
2•tags2k•23m ago•0 comments

Show HN: Poolnarc – catch hidden Linux cryptominers from two eBPF hooks

https://github.com/yeet-src/poolnarc
2•r3tr0•24m ago•0 comments

Show HN: .Net/C# TUI framework (used Claude)

https://github.com/rivoli-ai/andy-tui2
2•M4R5H4LL•24m ago•0 comments

Journal of my journey over the mountains ... in 1747-8 (by George Washington)

https://www.gutenberg.org/cache/epub/52395/pg52395-images.html
2•Michelangelo11•25m ago•0 comments

I Developed DaVinci Resolve Plugin to Edit Videos from Claude

https://www.youtube.com/watch?v=a9RQBNIBA2s
2•ivo_ovcharov•25m ago•1 comments

Upai.lat – Global AI-powered platform for startups and businesses

https://upai.lat/
2•deivst97•26m ago•0 comments

Distinguishing Technology from Technology

https://geoffgraham.me/distinguishing-technology-from-technology/
2•speckx•27m ago•0 comments

Visa invests in Replit to power agentic payments for developers

https://techcrunch.com/2026/05/28/visa-invests-in-replit-to-power-agentic-payments-for-developers/
6•alexreysa•28m ago•0 comments

Show HN: Create and Maintain Filesystem Structures

https://github.com/Isaac12x/seed-cli
2•hunterx•28m ago•0 comments

A native, local-first alternative to Logitech Options+, written in Rust

https://openlogi.org/en
4•driesdep•29m ago•0 comments