frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

LinkedIn, Everyone's an AI Detective Now

https://www.bloomberg.com/news/articles/2026-01-30/chatgpt-written-linkedin-posts-have-users-anal...
1•petethomas•2m ago•0 comments

Tautologism Language

https://zenodo.org/records/18446476
1•KaoruAK•3m ago•0 comments

Show HN: Licobox – Container runtime with Docker Engine on a macOS

https://licobox.dev
1•yunusefendi52•5m ago•0 comments

Show HN: Using OpenClaw chat to manage tasks with an Eisenhower Matrix

https://4to.do/integrations/openclaw
1•haoya•9m ago•0 comments

Why Do Lawyers Want to Abolish ICE? [video]

https://www.youtube.com/watch?v=zkgNnbTrsgw
1•zdw•15m ago•0 comments

Chrome Extension lets you watch YouTube while browsing the web

https://chromewebstore.google.com/detail/watch-youtube-sidebar/nfgnokdbenjkocebgekljbdolmfjbnhg
2•eeko_systems•21m ago•0 comments

RPyC – Transparent, Symmetric Distributed Computing

https://rpyc.readthedocs.io/en/latest/
1•benswerd•22m ago•0 comments

Start (Vibe) Coding Fast

https://chadnauseam.com/coding/tips/start-vibe-coding-fast
2•ChadNauseam•26m ago•2 comments

Show HN: ShotOne – Screenshot API with built-in playground for quick testing

https://shotone.io/
1•DebianXMR•28m ago•0 comments

Free Online Guitar Tuner: No download required, works on any device

https://www.online-guitartuner.com/
1•ashing•35m ago•1 comments

Apple Hooks Fifty Thousand Methods [video]

https://www.youtube.com/watch?v=SuQGQ1vh9k0
1•todsacerdoti•39m ago•0 comments

The (AI) Nature of the Firm

https://camerongordon0.substack.com/p/the-ai-nature-of-the-firm
1•iciac•43m ago•1 comments

PyInfra: Infrastructure Deserves Real Code in Python, Not YAML Soup

https://marp.kalvad.com/fosdem_2026
3•nogajun•44m ago•1 comments

China's 'gold fever' sparks US$1B scandal as trading platform collapses

https://www.scmp.com/economy/china-economy/article/3341633/chinas-gold-fever-sparks-us1-billion-s...
7•latchkey•48m ago•0 comments

Gemini 3 Pro on AI Studio has been capped at 10 uses per day

https://old.reddit.com/r/Bard/comments/1qqw8o4/gemini_3_pro_on_ai_studio_has_finally_been_capped/
1•Kholin•54m ago•0 comments

SpacemiT K3 RISC-V AI CPU launch event [video]

https://www.youtube.com/watch?v=PxxUsUqgOFg
1•sxzygz•55m ago•0 comments

Scalable Power Sampling: Training-Free Reasoning for LLMs via Distrib Sharpening

https://medium.com/@haitham.bouammar71/we-didnt-train-the-model-it-started-reasoning-better-anywa...
1•verdverm•56m ago•1 comments

'Spy Sheikh' Bought Secret Stake in Trump Company for Access to USA AI Chips

https://www.wsj.com/politics/policy/spy-sheikh-secret-stake-trump-crypto-tahnoon-ea4d97e8
6•NN88•57m ago•0 comments

I dropped my Google Pixel 9 XL Pro from 6th floor balcony to the street

https://ercanermis.com/i-dropped-my-google-pixel-9-xl-pro-from-6th-floor-balcony-to-the-street/
1•ermis•58m ago•0 comments

Tangible Media: A Historical Collection of Information Storage Technology

https://tangiblemediacollection.com/
2•vinhnx•1h ago•0 comments

Dealing with logical omniscience: Expressiveness and pragmatics (2011)

https://www.sciencedirect.com/science/article/pii/S0004370210000457
1•measurablefunc•1h ago•0 comments

Technical interviews are broken. I built a tool that proves it

1•ruannawe•1h ago•0 comments

What the US TikTok takeover is revealing about new forms of censorship

https://www.theguardian.com/commentisfree/2026/jan/30/tiktok-us-takeover-new-type-of-censorship
10•thunderbong•1h ago•1 comments

Show HN: OpenJuris – AI legal research with citations from primary sources

https://openjuris.org/
1•Zachzhao•1h ago•0 comments

BoTTube – A YouTube-like platform where AI agents create and share videos

https://bottube.ai/
1•AutoJanitor•1h ago•1 comments

ChatGPT is pulling answers from Elon Musk's Grokipedia

https://techcrunch.com/2026/01/25/chatgpt-is-pulling-answers-from-elon-musks-grokipedia/
7•abdelhousni•1h ago•0 comments

AI chatbots like ChatGPT are using info from Elon Musk's Grokipedia

https://mashable.com/article/ai-chatbots-chatgpt-sourcing-elon-musk-grokipedia
7•abdelhousni•1h ago•0 comments

The Disconnected Git Workflow

https://ploum.net/2026-01-31-offline-git-send-email.html
2•zdw•1h ago•0 comments

Ex-Googler nailed for stealing AI secrets for Chinese startups

https://www.theregister.com/2026/01/30/google_engineer_convicted_ai_secrets_china/
2•jacquesm•1h ago•2 comments

Show HN: Yesterdays, a platform for exploring historical photos of my city

https://yesterdays.maprva.org
1•uneekname•1h ago•0 comments