frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•10mo 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•10mo 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•10mo 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).

Extreme Strawberry Growing in South Korea

https://www.nytimes.com/card/2026/03/16/world/asia/south-korea-strawberry-farming
1•bookofjoe•1m ago•1 comments

Hedystia DB – A type-safe ORM for TypeScript with smart caching

https://docs.hedystia.com
1•Zastinian•2m ago•0 comments

Show HN: EyesOff – On-device AI that catches shoulder surfers

https://www.eyesoff.app
1•Two_hands•2m ago•0 comments

Apollo's John Zito questions private equity's software valuations

https://www.cnbc.com/2026/03/16/apollo-john-zito-private-equity-software-valuations.html
1•rpcope1•7m ago•0 comments

Adding Innovation Labs

https://www.rubick.com/innovation-labs/
1•donutshop•9m ago•0 comments

The Unbroken Chain

https://www.ersinakinci.com/p/the-unbroken-chain
1•earksiinni•9m ago•0 comments

Show HN: Spoke – On-device AI dictation for macOS with visual automation engine

https://usespoke.app/
2•usespoke•14m ago•1 comments

Analysis of Endocrine Disruptors and Hazardous Additives in Headphones

https://arnika.org/en/publications/the-sound-of-contamination
1•shaicoleman•16m ago•0 comments

Show HN: AI Products Quality Monitoring

https://www.useargoos.com/
1•aleksam•17m ago•0 comments

Ukraine's Defense Industrial Base–An Anchor for Economic European Security

https://www.cfr.org/articles/securing-ukraines-future-in-europe-ukraines-defense-industrial-base-...
2•JumpCrisscross•17m ago•0 comments

Technical Analysis of CVE-2025-14500: IceWarp Webmail Pre-Auth RCE Chain

https://mileniumsec.com/blog/cve-2025-14500-icewarp-analysis
2•azqzazq•20m ago•1 comments

US judge blocks efforts to reshape childhood vaccine policy

https://www.reuters.com/world/us-judge-blocks-efforts-reshape-childhood-vaccine-policy-2026-03-16/
2•kaycebasques•21m ago•1 comments

A Kubernetes Upgrade Story

https://senthil.learntosolveit.com/posts/2026/03/15/the-prow-upgrade-story.html
2•orsenthil•23m ago•0 comments

Apple acquires video editing company MotionVFX to boost subscribers

https://www.cnbc.com/2026/03/16/apple-acquires-video-editing-company-motionvfx-to-boost-subscribe...
1•dominikposmyk•23m ago•0 comments

Show HN: pg_typescript, a Postgres extension for writing functions in TypeScript

https://github.com/isaacd9/pg_typescript
1•idd2•24m ago•0 comments

Operating Systems: Timeline and Family Tree

https://eylenburg.github.io/os_familytree.htm
4•ryan-ca•25m ago•0 comments

Reddit User Uncovers Who Is Behind Meta's $2B Lobbying for Age Verification

https://www.gadgetreview.com/reddit-user-uncovers-who-is-behind-metas-2b-lobbying-for-invasive-ag...
2•d41dev•26m ago•0 comments

Why isn't AI diffusing faster?

https://joelmjensen.com/posts/why-isnt-ai-diffusing-faster/
2•ghiculescu•28m ago•0 comments

GetItBack – Security deposit claim checker covering all 50 states

https://getitback.us/questionnaire
2•neatway•28m ago•0 comments

Show HN: BonzAI – 1-click local AI inference and yield-bearing AI artifacts

https://www.bonzai.sh/
1•wilhempujar•29m ago•0 comments

Show HN: Pincer – Twitter/X for bots. No humans allowed

https://pincer.wtf
4•johnpolacek•29m ago•1 comments

Return of the Obra Dinn: spherical mapped dithering for a 1bpp first-person game

https://forums.tigsource.com/index.php?topic=40832.msg1363742#msg1363742
1•PaulHoule•29m ago•0 comments

Self-hosting Git and builds without running a bunch of web services

https://duggan.ie/posts/self-hosting-git-and-builds-without-running-a-bunch-of-web-services
1•thunderbong•30m ago•0 comments

Transaction Boundaries Are a Business Concept

https://rafaelfiume.blog/2025/12/24/encoding-transaction-boundaries-as-business-concepts/
1•rfiume•31m ago•0 comments

OpenClaw Monitoring and Observability with OpenTelemetry

https://signoz.io/docs/openclaw-monitoring/
2•pranay01•31m ago•0 comments

Cnsplots: A Python library for Cell, Nature, and Science quality plots

https://github.com/faridrashidi/cnsplots
1•faridrashidi•31m ago•1 comments

A Model for Economic Freedom on Mars

https://arxiv.org/abs/2406.10380
1•AFF87•32m ago•0 comments

How the Trump Administration Weaponized Antifa

https://weaponizedspaces.substack.com/p/how-the-trump-administration-weaponized
3•rbanffy•32m ago•0 comments

U.S. imposes sanctions over North Korean scheme to use remote workers

https://www.cbsnews.com/news/north-korea-us-sanctions-remote-workers-weapons-program/
4•rbanffy•33m ago•0 comments

Powering AI: Europe switches on first microgrid data center in Dublin

https://www.cnbc.com/2026/03/11/data-center-microgrid-power-ireland-ai-boom-avk-pure-dc.html
1•rbanffy•33m ago•0 comments