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

Reasoning-core: 130M-param guardrail keeping AI agents honest

https://github.com/jakubkrzysztofsikora/reasoning-core
1•mnvibe26x7•1m ago•0 comments

Show HN: SWEny, YAML workflows for AI agents I'm running in prod (triage, E2E)

https://github.com/swenyai/sweny
1•wickdninja•2m ago•0 comments

Hex: Introducing Generative Data Apps

https://hex.tech/blog/introducing-generative-data-apps/
1•tomtomau•4m ago•1 comments

The Space Shuttle and the Horse's Rear End

https://astrodigital.org/space/stshorse.html
1•thunderbong•6m ago•0 comments

Jupiter supercomputer breaks world record with 50-qubit quantum simulation

https://www.sciencedaily.com/releases/2026/05/260510234715.htm
1•jldew93•7m ago•0 comments

SSHD Log Security Analysis - popular languages SDKs

https://github.com/melezhik/Sparrow6/blob/master/task.check
1•melezhik•8m ago•3 comments

Prompting Patterns (Groq Documentation)

https://console.groq.com/docs/prompting/patterns
1•tacone•10m ago•0 comments

AI was made for junk mail

https://junkmailmagic.com
1•husky8•16m ago•0 comments

I got tired of realizing "discounts" weren't discounts

https://apps.apple.com/us/app/silicon-ai-price-comparison/id6764054291
2•stayoneup•24m ago•0 comments

Show HN: SelfCertForge, manage root CAs and self-signed certs on macOS/Windows

https://github.com/rbonestell/SelfCertForge
2•rbonestell•25m ago•0 comments

I vibecoded a game and got my first paying supporter

https://gunguesser.com
1•salad_v•32m ago•1 comments

xkcd: Well 2

https://xkcd.com/568/
2•ulrikrasmussen•44m ago•0 comments

Solving Brain Aging: Fast and Slow

https://blog.amaranth.foundation/p/solving-brain-aging-fast-and-slow
2•pminimax•55m ago•0 comments

Fear of layoffs what should I do?

3•cipherdc•58m ago•0 comments

'Googlebooks' have a premium focus, some Chromebooks can be upgraded

https://9to5google.com/2026/05/12/googlebooks-have-a-premium-focus-some-chromebooks-can-be-upgraded/
1•theanonymousone•1h ago•0 comments

NPM-Scan – Detects TanStack Worm, Beats Socket/Snyk (Local/BYOC)

https://github.com/lateos-ai/npm-scan
1•lateos-ai•1h ago•0 comments

eBay rejects $56B GameStop bid as 'neither credible nor attractive'

https://www.ft.com/content/554f76a6-218d-4f88-bcad-9c52623ef533
1•petethomas•1h ago•0 comments

The identity join problem: Linking SSO profiles to directory users

https://workos.com/blog/linking-sso-profiles-to-directory-users
2•jamilbk•1h ago•0 comments

Let's Encrypt: Gen Y Cross-Certified Subordinate CAs Missing ServerAuth EKU

https://bugzilla.mozilla.org/show_bug.cgi?id=2038351
4•XYen0n•1h ago•0 comments

Ask HN: Freelance Billing in the Age of LLMs?

2•meter•1h ago•0 comments

Temu is advertising filet mignon on X

https://twitter.com/shoptemu/status/2053092200632685016
40•noleary•1h ago•7 comments

Rectangle Shopping (Almost Anything)

https://www.rectangle.so
1•Waseemkhalo•1h ago•1 comments

Cemu (WiiU emulator) compromised by Russian threat actor

https://rentry.co/cemu-security-psa
4•gassi•1h ago•0 comments

Claude for Legal Launches

https://www.artificiallawyer.com/2026/05/12/claude-for-legal-launches-may-reshape-the-legal-tech-...
1•msolujic•1h ago•0 comments

[PATCH linux] README: Don't organize the README by arbitrary "roles"

https://lore.kernel.org/lkml/20260513004616.2877-1-me@runxiyu.org/T/#u
1•runxiyu•1h ago•0 comments

Self-hosted AI memory with web dashboard – Cloudflare Workers, D1, Vectorize

https://github.com/rahilp/second-brain-cloudflare
1•rahilpirani•1h ago•0 comments

Diversity and functional profile of the "microbial proteome" in fermented foods

https://pubs.rsc.org/en/content/articlelanding/2026/fo/d5fo05039a
2•PaulHoule•1h ago•0 comments

BYOM stock analysis via MCP, looking for feedback

https://stocks.lynxdi.com/
1•pezhao•1h ago•0 comments

Show HN: I spent $100 in Claude tokens and 1k battles training my AI tank

https://agentank.ai/history/mat_8v9fSEZE8295dcZ8U
2•mazzystar•1h ago•0 comments

DMARC Fail: 7 Causes and How to Fix Each

https://dmarcguard.io/blog/dmarc-failed-how-to-fix/
2•meysamazad•1h ago•0 comments