frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Caroline affair – eventually influencing the development of international law

https://en.wikipedia.org/wiki/Caroline_affair
1•vinnyglennon•3m ago•0 comments

Show HN: WingNews – Htmx Hacker News Reader

https://news.wingman.actor/
1•ChaseRensberger•4m ago•0 comments

AI Doesn't Remember Yesterday. How to Design Team Memory for AI Workflows

https://github.com/htuzel/flalingo-mem-bridge
1•htuzel•4m ago•0 comments

Ask HN: Wish Linux tmpfs support compression option

1•gry_gh•4m ago•0 comments

Howard Abrams' Literate Programming with Org Mode [video]

https://www.youtube.com/watch?v=OUuz9-CtCwY
1•todsacerdoti•9m ago•0 comments

My SoC Analyst Writeup – Support by star, thanks guys

https://github.com/ogtamimi/SOC-Analyst-WriteUp-LetsDefend.io
1•ogtamimi•10m ago•0 comments

Create PDF Resume

https://createpdfresume.com/
1•tahirasadov•12m ago•0 comments

All of you doubted me, and said I was hallucinating on AI

https://ryanshamim.substack.com/p/the-inference-efficiency-paradox
1•anima-core•13m ago•1 comments

Tech titans vow to 'take back' California

https://nypost.com/2026/03/05/us-news/tech-titans-vow-to-take-back-california-from-lefties-call-o...
1•mudil•15m ago•0 comments

First Aptera Solar EV Rolls Off Validation Assembly Line

https://aptera.us/first-vehicle-off-validation-line/
1•TeaVMFan•16m ago•0 comments

Show HN: Yappy – A Python TUI to automate LinkedIn yapping

https://github.com/JienWeng/yappy
2•jienweng•33m ago•0 comments

Shut Up and Take My Money

https://lorendb.dev/posts/shut-up-and-take-my-money/
3•LorenDB•38m ago•0 comments

Spell UI

https://spell.sh/
1•handfuloflight•39m ago•0 comments

Show HN: Swarm – Program a colony of 200 ants using a custom assembly language

https://dev.moment.com/
6•armandhammer10•40m ago•3 comments

Show HN: Custom Search Engine on Safari and Spotlight (macOS)

https://knhash.in/custom-search-engine-on-safari-and-spotlight-macos/
2•knhash•41m ago•0 comments

Show HN: SafeAgent – exactly-once execution guard for AI agents

2•Lions2026•41m ago•0 comments

Enhanced brain cells clear away dementia-related proteins

https://medicalxpress.com/news/2026-03-brain-cells-dementia-proteins.html
4•WaitWaitWha•41m ago•0 comments

Google Patent: Sending Searchers to AI-Generated Pages over Your Site

https://www.seroundtable.com/google-patent-ai-generated-pages-search-41010.html
3•frays•43m ago•0 comments

System76 on Age Verification Laws

https://blog.system76.com/post/system76-on-age-verification/
2•LorenDB•43m ago•0 comments

A Technology for a Low-Trust Society

https://www.theatlantic.com/technology/2026/03/central-lie-prediction-markets/686250/
3•CaptainZapp•46m ago•0 comments

Tollund Man

https://en.wikipedia.org/wiki/Tollund_Man
1•thunderbong•51m ago•0 comments

Show HN: Steadwing – Your Autonomous On-Call Engineer

https://www.steadwing.com/
4•abejith•53m ago•0 comments

Show HN: Verak – Fake Seller Detection for Digital Marketplaces

https://www.verak.io/demo
1•Mikewillcodes•54m ago•0 comments

One Agent SDK – Embed Claude Code in Your App with Codex and Kimi

https://odysa.github.io/one-agent-sdk/
2•agentforce•54m ago•1 comments

Don't Call It 'Intelligence'

https://www.theatlantic.com/ideas/2026/03/intelligence-concept/686121/
2•petethomas•54m ago•0 comments

Parakaryon: The only species with a unknown position in the tree of life

https://en.wikipedia.org/wiki/Parakaryon
1•icwtyjj•54m ago•0 comments

Warden by Sentry

https://warden.sentry.dev/
1•handfuloflight•55m ago•0 comments

Show HN: kg Food Log: Reveal the molecules in your foods

https://kg.enzom.dev/
2•emadda•55m ago•0 comments

On the need for a censorship API for legal compliance in some regions

https://lists.debian.org/debian-legal/2026/03/msg00018.html
2•iamnothere•57m ago•1 comments

Breaking Down 50M Pins: A Smarter Way to Design 3D IC Packages

https://www.allaboutcircuits.com/industry-articles/breaking-down-50-million-pins-a-smarter-way-to...
2•WaitWaitWha•59m ago•0 comments