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

Mapping Vulnerability to Extreme Heat

https://ocsi.uk/2026/08/28/mapping-vulnerability-to-extreme-heat-a-new-neighbourhood-level-index-...
1•speckx•34s ago•0 comments

Show HN: Moral.games, a 1v1 ethics game with an AI judge

https://moral.games
1•dvt•39s ago•0 comments

What Makes a Great Investor?

https://www.economist.com/finance-and-economics/2026/08/25/what-makes-a-great-investor
1•paulpauper•45s ago•0 comments

LogitScope: Analyzing LLM uncertainty from token probability distributions

https://github.com/ibm-granite/granite.debug-tools/tree/main/logitscope
1•mncharity•55s ago•0 comments

Ask HN: Software Licenses that prevent LLMs from training on open source?

1•mattm•1m ago•0 comments

Bank accounts frozen in MHRA weight-loss jab investigation

https://www.bbc.com/news/articles/cpd7x5wnnn7o
1•paulpauper•1m ago•0 comments

The Marine Sanctuary Protecting the Gulf's Coral Life

https://texashighways.com/outdoors/water/the-marine-sanctuary-protecting-the-gulfs-coral-life/
1•ohjeez•2m ago•0 comments

Eiffel Tower employees strike after female staff removed

https://www.dw.com/en/eiffel-tower-closed-strike-women-hindu/a-79152603
2•thunderbong•3m ago•0 comments

CrowdStrike Announces Agentic Identity Provider

https://www.crowdstrike.com/en-us/blog/crowdstrike-announces-agentic-identity-provider/
1•syumei•3m ago•0 comments

TCP Path Diagnostics

https://curl.realhackers.org/
1•Bender•4m ago•1 comments

I think I used the Hermes Agent wrong

https://heyjonny.dev/posts/i-think-i-used-the-hermes-agent-wrong/
1•heyjonny•5m ago•0 comments

Anthropic Researcher Quits over 'Out-of-Control' AI Fears

https://www.wsj.com/tech/ai/anthropic-researcher-quits-over-out-of-control-ai-fears-707b7628
2•joe_the_user•6m ago•1 comments

The Battle for the Soul of Lockpicking

https://www.huckmag.com/article/the-battle-for-the-soul-of-lockpicking
2•rdmuser•6m ago•0 comments

Show HN: Locksmith: Store Maven Secrets in the macOS Keychain (Or a Unix Socket)

https://github.com/exabrial/locksmith
2•exabrial•7m ago•0 comments

The new addiction to working all the time

https://josem.co/the-new-addiction-to-working-all-the-time/
2•josem•7m ago•0 comments

Anthropic Is Building a Predictive Surveillance System to Monitor Activists

https://prospect.org/2026/09/09/anthropic-artificial-intelligence-surveillance-system-monitor-act...
6•dn2k•7m ago•0 comments

Managing Sideways

https://kevingoldsmith.substack.com/p/managing-sideways
2•fagnerbrack•7m ago•0 comments

Google warns of new Chrome zero-day bug exploited in attacks

https://www.bleepingcomputer.com/news/security/google-patches-seventh-chrome-zero-day-exploited-i...
2•DemiGuru•8m ago•0 comments

Vertebrae: Privacy-First AI Notetaker

https://vertebrae.ai/
2•qin•8m ago•0 comments

Over 36,000 exposed Plex servers vulnerable to recent flaws

https://www.bleepingcomputer.com/news/security/over-36-000-plex-servers-unpatched-against-recentl...
3•DemiGuru•9m ago•0 comments

Dive into FrontierHarness Eval: Claude Code cost 5.6× for the same pass rate

https://runta.com/blog/introducing-frontierharness-eval/
5•ADD-SP•9m ago•3 comments

Amazon is now using generative AI to dub Prime Video with matching lip movements

https://www.neowin.net/news/amazon-prime-video-is-getting-ai-powered-dubbing-that-syncs-actors-lips/
2•bundie•10m ago•0 comments

I Am an Anthropic Guy. GPT-6 Astra Made Me Resubscribe to Codex

https://thoughts.jock.pl/p/gpt-6-astra-vs-claude-fable-5-1-agent-notes-2026
3•joozio•12m ago•0 comments

Understanding the Recent DDoS Attack Against Read the Docs

https://about.readthedocs.com/blog/2026/09/2026-ddos-attack/
3•davidfischer•13m ago•0 comments

AI could kill all humans in next decade, warn experts

https://www.theguardian.com/technology/2026/sep/09/ai-superintelligence-risks-warnings-scientists...
4•lf88•15m ago•1 comments

GNU Radio in the Browser

https://gnuradioworld.com/
5•kristianpaul•16m ago•0 comments

How long has it been since you last wrote code

https://meelangofficial.substack.com/p/how-long-has-it-been-since-you-last
3•BrucecarlL•16m ago•1 comments

Simple Answers (Xkcd)

https://xkcd.com/1289/
2•piinbinary•16m ago•0 comments

A Guide to Link Building for SaaS Companies

https://seenearme.com/blog/a-guide-to-link-building-for-saas-companies
2•Rollmodl•17m ago•0 comments

Couples with children with ADHD at risk of higher divorce rates

https://www.buffalo.edu/news/releases/2008/10/9713.html
3•andrewstetsenko•17m ago•1 comments