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

AI in Linux

https://drewdevault.com/blog/AI-in-Linux/
1•signa11•12s ago•0 comments

SOTA on the hardest AI memory benchmark (BEAM, 10M tokens), with a smaller model

1•johnnymakes•1m ago•0 comments

Rear center fuel tank adds roughly 20k liters and extends range by 1k NM

https://www.airbus.com/en/newsroom/press-releases/2026-06-worlds-longest-range-aircraft-the-airbu...
1•r2sk5t•1m ago•0 comments

SpaceX at $100 could mean investors see zero value in its AI

https://www.latimes.com/business/story/2026-07-27/spacex-at-100-could-mean-investors-see-zero-val...
1•1vuio0pswjnm7•2m ago•0 comments

Kedge Quickstart

https://kedge.dev/docs/quickstart
1•bcjordan•2m ago•0 comments

Me in the Notes App

https://time.com/article/2026/07/24/meet-me-in-the-notes-app/
1•speckx•2m ago•0 comments

Show HN: A terminal editor that can discuss with OpenCode and Pi

https://sollawen.github.io/microNeo/
1•sollawen•3m ago•0 comments

Is an AI company buying up all the used books? (I don't think so, not this time)

https://charliebecker.substack.com/p/is-an-ai-company-buying-up-all-the
1•rahimnathwani•4m ago•0 comments

How Terence Tao's insight translates to how we need to think about the economy

https://wilsoniumite.com/2026/07/28/how-terence-taos-metamathematical-insight-translates-to-how-w...
1•Wilsoniumite•5m ago•0 comments

VistaRama65

https://www.in70mm.com/presents/library/orphan/2026_forever/about/index.htm
1•Teever•5m ago•0 comments

Qantas plane flies for more than 24 hours in record-breaking flight

https://www.theguardian.com/business/2026/jul/28/qantas-plane-flies-for-more-than-24-hours-in-rec...
2•tosh•5m ago•0 comments

Faulty Reward Functions in the Wild (2016)

https://openai.com/blog/faulty-reward-functions
1•_vk_•7m ago•0 comments

Harmony Explained: Progress Towards a Scientific Theory of Music (2012)

https://arxiv.org/abs/1202.4212
3•surprisetalk•7m ago•0 comments

Show HN: PidgeIoT – open-source IoT/Embedded device management for all (free*)

https://pidgeiot.com/
1•Voxorin•8m ago•1 comments

Redev – AI chat assistant for React DevTools

https://chromewebstore.google.com/detail/redev-–-ai-chat-assistant/ojiiafcaodjlfegglkfgokgebgcf...
1•denniscual•8m ago•0 comments

Buzz (by Block) is pretty neat

https://chad.cm/posts/2026-7-27-buzz-in-action
2•carimura•8m ago•0 comments

Show HN: Injex – tiny typed DI for Python validates the graph before startup

https://github.com/vshulcz/injex
1•vshulcz•8m ago•0 comments

Autonomous SEO agent that finds, writes, and publishes blog posts

https://boldpilot.club
1•ahmetsaridagx•9m ago•0 comments

GrapheneOS Defends Data-Wiping Function That Blocked US Border Search

https://www.pcmag.com/news/grapheneos-defends-data-wiping-function-that-blocked-us-border-search
7•pseudolus•10m ago•0 comments

Ella, an AI friend with an inner life that runs while you're away

https://Ellasworlds.com
1•Levip•10m ago•0 comments

Making KIO copy many files fast

https://blogs.kde.org/2026/07/28/making-kio-copy-many-files-fast/
2•signa11•12m ago•0 comments

Kaney's Weird Files – July 2026 Edition

https://kaneysweirdfiles.substack.com/p/july-2026-a-mutant-coon-a-book-review
1•experiencertim•12m ago•0 comments

Show HN: Higgs, a local AI CLI for Proton Mail (no cloud, no telemetry)

https://github.com/higgscli/higgs
1•cyberflux•13m ago•0 comments

TaskLoco reveals unprecedented productivity secret- Sticky Notes on a Storyboard

https://www.taskloco.com/
1•taskloco_nyc•14m ago•0 comments

Cacheinvalidate.com Was Still Available

https://cacheinvalidate.com
1•promptfluid•14m ago•0 comments

Sorry, the Data Says Communist

https://postcapitalistrobots.substack.com/p/sorry-the-data-says-communist
1•alejodosr•15m ago•1 comments

Show HN: Repo Autopsy – Transparent heuristics for repository install friction

https://repo-autopsy.zdfb20650.workers.dev
1•echoscarrie•15m ago•0 comments

Software Verification in the Age of Artificial Intelligence

https://learning.acm.org/techtalks/softwareai
2•rbanffy•16m ago•0 comments

Astronomers find strongest evidence yet that Betelgeuse has a companion

https://www.eso.org/public/news/eso2611/
1•Ralfp•17m ago•0 comments

Automation Led to Economic Misery. AI Doesn't Have To

https://www.theatlantic.com/ideas/2026/07/ai-automation-productivity-workers/688083/
1•01-_-•18m ago•0 comments