frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•11mo 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•11mo 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•11mo 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 predictions in the movie Electric Dreams (1984)

https://medium.com/@tk512/the-ai-predictions-in-the-movie-electric-dreams-1984-0c6a47a6326e
2•sgt•1m ago•0 comments

The College-Admissions Chess Game Is More Complicated

https://www.wsj.com/us-news/education/college-admissions-yield-rate-2fb30f42
2•apparent•1m ago•0 comments

Article explains a method to estimate parameter count of closed sourcemodels

https://www.lesswrong.com/posts/veFMEzDDyWaer2Sms/sanity-checking-incompressible-knowledge-probes
2•theanonymousone•4m ago•1 comments

Why Nihilism Is Great for Values

https://ajkprojects.com/why-nihilism-is-great-for-values.html
2•ashleynewman•5m ago•0 comments

A desktop that bends to me

https://isene.org/2026/05/Agency.html
2•speckx•5m ago•0 comments

Numbers and the launch algorithm of an indie game that was featured on itch.io

https://blog.luden.io/how-we-stayed-on-the-front-page-of-itch-io-for-over-a-month-8e0d0cf1cc17
3•gamescodedogs•6m ago•2 comments

DeepSeek v4, and the end of the OpenAI/Microsoft AGI clause

https://simonw.substack.com/p/deepseek-v4-and-the-end-of-the-openaimicrosoft
2•JumpCrisscross•10m ago•0 comments

Show HN: BeautyShot – easy macOS promo screenshots

https://bendansby.com/apps/beautyshot.html
2•webwielder2•13m ago•0 comments

Anti-DDoS Firm Heaped Attacks on Brazilian ISPs

https://krebsonsecurity.com/2026/04/anti-ddos-firm-heaped-attacks-on-brazilian-isps/
1•Bender•15m ago•0 comments

Strong types are a non-negotiable for LLMs

https://hireup.team/articles/strong-types-for-llms
1•rdaviz•15m ago•0 comments

Bsky.land – a photo stream from the Bluesky firehose

https://bsky.land/
2•bcks•15m ago•0 comments

I built GeoGuesser for guns, and its making money (no technical experince)

https://gunguesser.com
1•salad_vr•18m ago•3 comments

How can perplexity.com persist on the browser without extension

2•roscas•19m ago•0 comments

Agent Personality Score

https://agentpersonalityscore.com/
1•forthwall•19m ago•0 comments

OpenAI's advanced security: passkeys replace passwords/SMS and disable training

https://infosec.exchange/@tychotithonus/116500494420882843
1•speckx•20m ago•0 comments

The Resonance of Berkshire Hathaway

https://tinkelenberg.com/posts/the-resonance-of-berkshire-hathaway/
1•tinkelenberg•21m ago•0 comments

CachyOS Linux Performance Leading over Ubuntu 26.04 LTS, Fedora Workstation 44

https://www.phoronix.com/review/cachyos-ubuntu-2604-fedora-44
2•Bender•22m ago•0 comments

Linux Support Coming for the Asus ROG Raikiri II

https://www.phoronix.com/news/ASUS-ROG-RAIKIRI-II-Linux
1•Bender•23m ago•0 comments

IBM Granite 4.1 family of models

https://research.ibm.com/blog/granite-4-1-ai-foundation-models
2•srameshc•24m ago•0 comments

SRE at 53 watching my role get automated – how do I build something of my own?

1•TheFounderFile•26m ago•1 comments

A statement about why RightsCon 2026 will not take place in Zambia

https://www.rightscon.org/rc26-statement/
28•benbreen•26m ago•1 comments

Inspect and filter every HTTP request leaving your microVM

https://slicervm.com/blog/programmable-microvm-egress/
2•alexellisuk•26m ago•0 comments

City Learns Flock Accessed Cameras in Children's Gymnastics Room as a Sales Demo

https://www.404media.co/city-learns-flock-accessed-cameras-in-childrens-gymnastics-room-as-a-sale...
20•joshcsimmons•27m ago•1 comments

Why Your Pbxproj Is Bloated (and How to Fix It)

https://codingwithvera.com/why-your-pbxproj-is-bloated-and-how-to-fix-it/
2•tfe•27m ago•0 comments

I wrote a beginner friendly guide to integrating AI into projects

https://www.amazon.co.uk/Building-AI-Developers-Guide-Integrating-ebook/dp/B0GX3B3MV1
2•ungureanustefan•29m ago•1 comments

Search is full of ads and wrong answers

https://twitter.com/effthealgorithm/status/2049844370203939149
1•dancric•29m ago•0 comments

Show HN: Omar – A TUI for managing 100 coding agents

https://omar.tech
6•karim7•30m ago•0 comments

MySQL 9.7.0 LTS Is Now Available

https://blogs.oracle.com/mysql/mysql-9-7-0-lts-is-now-available-expanded-community-capabilities-a...
1•bratao•31m ago•0 comments

First Tesla Semi Rolls Off High-Volume Production Line

https://electrek.co/2026/04/29/tesla-semi-first-truck-high-volume-production-line/
4•m463•31m ago•0 comments

The exotic particles that could break the Standard Model

https://www.nature.com/articles/d41586-026-01387-x
4•Brajeshwar•32m ago•0 comments