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

Code, craft, and the making of nested folders

https://www.figma.com/blog/code-craft-and-the-making-of-nested-folders/
1•handfuloflight•1m ago•0 comments

What Trump's latest slump means for the midterms

https://www.natesilver.net/p/what-trumps-latest-slump-means-for
1•7777777phil•4m ago•0 comments

Show HN: Open-source book format for instant translations and Android app

https://tbook.dev/
1•adubovskoy•4m ago•1 comments

Two Have Died in the Cyclospora Outbreak. The Fifty-State Count Is Now 21,913

https://www.marlerblog.com/case-news/two-people-have-died-in-the-cyclospora-outbreak-the-fifty-st...
1•speckx•4m ago•0 comments

Set Theory Symbols

https://www.rapidtables.com/math/symbols/Set_Symbols.html
1•marysminefnuf•8m ago•0 comments

Show HN: On the Dot – a timing game where the stopwatch vanishes after 1.5s

https://hitthedot.app/
1•Aditya_Tickoo•10m ago•0 comments

The Emerging Market for Intelligence- How Firms Buy and Sell AI [PDF]

https://pubs.aeaweb.org/doi/pdfplus/10.1257/jep.20261506
1•malshe•10m ago•0 comments

AI system Locus posttrains a model better than Qwen3

https://twitter.com/intology/status/2084319121332965804
1•yuchiz•10m ago•0 comments

Adding Go's Defer to the TypeScript Compiler

https://healeycodes.com/adding-defer-to-the-typescript-compiler
1•ibobev•12m ago•0 comments

Ryg_rans Is Not a Library

https://fgiesen.wordpress.com/2026/08/03/ryg_rans-is-not-a-library/
1•ibobev•12m ago•0 comments

ZX Spectrum System Tour: Sound

https://bumbershootsoft.wordpress.com/2026/08/01/zx-spectrum-system-tour-sound/
2•ibobev•12m ago•0 comments

Show HN: Educational Options Calculator

https://options.olelohonua.com/
1•rbrownrw8•14m ago•1 comments

Show HN: Java MultiTool – How I Replaced 6 browser tabs with a Single Program

https://github.com/ShiningPr1sm/JavaMultiTool
1•shiningpr0xsm•14m ago•0 comments

The Nudge Unit

https://www.pimlicojournal.co.uk/p/inside-the-nudge-unit
2•like_any_other•15m ago•0 comments

The UK is still trying to force an iCloud backdoor

https://9to5mac.com/2026/08/03/apple-launches-second-legal-challenge-to-uk-icloud-backdoor-order-...
2•BlueBerry2001•15m ago•0 comments

Show HN: I am selling my product launch platform LaunchDaddy

1•alizaid•15m ago•0 comments

ReMarkable Paper Pro Move Running Android 12

https://www.reddit.com/r/RemarkableTablet/comments/1v9jbdf/i_got_android_12_running_locally_on_a_...
2•rvz•18m ago•0 comments

Cloudflare Mobile – an open-source Android client for the Cloudflare API

https://github.com/hasanzadee/cloudflare-mobile
1•drakoncik•19m ago•0 comments

A Bitcoin fork where UTXOs expire after seven years

https://github.com/organicbitcoin/obtcd
2•organicbitcoin•20m ago•0 comments

AI slop pollutes the CVE pipeline with fake vulns

https://www.theregister.com/security/2026/08/03/ai-slop-pollutes-the-cve-pipeline-with-fake-vulns...
2•speckx•20m ago•0 comments

Keep agent skills updated across your GitHub repositories

https://github.com/biw/skills-updater
1•biwills•21m ago•0 comments

Kermit oral history panel (2012)

https://www.computerhistory.org/collections/catalog/102746411/
1•compiler-guy•21m ago•0 comments

The Dr. K Project [pdf]

https://new.aaai.org/Papers/Symposia/Fall/1999/FS-99-01/FS99-01-021.pdf
1•bryanrasmussen•22m ago•0 comments

The message beneath the yen intervention

https://www.axios.com/2026/08/03/yen-japan-treasury-bessent
2•MKais•23m ago•0 comments

Founder shares pictures of their new office; they turn out to be AI-generated

https://twitter.com/ayushagarwal/status/2084169152843911582
2•pranshuchittora•24m ago•4 comments

Show HN: RouteKit – a model gateway for coding subscriptions

https://routekit.velum-labs.com
3•benjamnzc•24m ago•0 comments

Phil Needleman's Ten Commandments of Drug R&D

https://lifescivc.com/2013/03/phil-needlemans-ten-commandments-of-drug-rd/
1•geneticdrifts•25m ago•0 comments

Is Hermes Agent unusable without a model router?

https://github.com/maximhq/bifrost/
1•Swapnoneel•25m ago•1 comments

In Defense of Government Whimsy

https://www.trailcrewstories.com/stories/whimsy
1•toomuchtodo•26m ago•0 comments

Show HN: Open-source tool to check if ChatGPT recommends your business

https://github.com/d08m/crazyseo
1•Dom1•28m ago•0 comments