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

Movie reconstruction from mouse visual cortex activity

https://elifesciences.org/articles/105081
1•_____k•1m ago•0 comments

The usability imperative for securing digital asset devices

https://www.technologyreview.com/2026/03/09/1132352/the-usability-imperative-for-securing-digital...
1•joozio•1m ago•0 comments

Ask HN: Identity preservation vs. information transfer in LLMs

1•PennyTee•2m ago•0 comments

After falling far behind the rest, Blue Origin creates new stock option plan

https://arstechnica.com/space/2026/03/after-years-of-missteps-blue-origin-to-finally-offer-meanin...
1•oldnetguy•2m ago•0 comments

Show HN: AI agent that runs real browser workflows

https://ghostd.io
2•heavymemory•3m ago•0 comments

Laser-Based 3D Printing Could Build Future Bases on the Moon

https://www.universetoday.com/articles/laser-based-3d-printing-could-build-future-bases-on-the-moon
1•oldnetguy•4m ago•0 comments

Do Offshore Wind Farms Pose National Security Risks?

https://spectrum.ieee.org/offshore-wind-military-radar
1•oldnetguy•4m ago•0 comments

PgAdmin 4 9.13 with AI Assistant Panel

https://www.pgadmin.org/docs/pgadmin4/9.13/query_tool.html#ai-assistant-panel
1•__natty__•5m ago•0 comments

There are 56 ethnicities in China–and 55 are getting squashed

https://economist.com/china/2026/03/09/there-are-56-ethnicities-in-china-and-55-are-getting-squashed
4•andsoitis•8m ago•0 comments

The Road

https://en.wikipedia.org/wiki/The_Road
2•chistev•10m ago•1 comments

Fifty years of sexing up tech: Apple's epic hits – and misses

https://www.theguardian.com/technology/2026/mar/10/50-years-apple-epic-hits-and-misses
1•frereubu•12m ago•0 comments

Chinese tech hubs promote OpenClaw AI agent despite security warnings

https://www.reuters.com/world/asia-pacific/chinas-shenzhen-backs-openclaw-ai-with-subsidies-despi...
2•TMWNN•16m ago•0 comments

The Architecture of an Exit Scam: A Technical Audit of Zszrun

1•cappyfjao•17m ago•0 comments

China's AI giants are handing out cash to lure in users

https://economist.com/business/2026/03/09/chinas-ai-giants-are-handing-out-cash-to-lure-in-users
1•andsoitis•17m ago•0 comments

Do the Illegible

https://ashwinsundar.com/posts/legibility-and-programming/
2•wofo•18m ago•0 comments

Amdahl's Law

https://en.wikipedia.org/wiki/Amdahl%27s_law
2•olalonde•19m ago•0 comments

Ask HN: P2P Trust Network for reviews in the 2020s

1•JCharante•21m ago•0 comments

Why "Authentic" Is the Next Thing We'll Game

https://balint.blog/gamed/
2•balintkorosi•22m ago•1 comments

Claude Code Skills and Plugins as an Open Source Project

https://github.com/alirezarezvani/claude-skills
1•jungard•22m ago•1 comments

Curious about just how adult the weather can get

https://twitter.com/troyhunt/status/2031079752631808350
1•bilsbie•23m ago•0 comments

LLM-Assisted Reverse Engineering

https://skullbloc.com/posts/llm-assisted-reverse-engineering/
1•stebbins•26m ago•0 comments

6k Bad Coding Lessons Turned a Chatbot Evil

https://www.nytimes.com/2026/03/10/opinion/ai-chatbots-virtue-vice.html
1•acjohnson55•27m ago•0 comments

F-35 Software Could Be Jailbreaked Like an iPhone: Dutch Defense Secretary

https://www.twz.com/air/f-35-software-could-be-jailbreaked-like-an-iphone-dutch-defense-minister
2•tzury•27m ago•1 comments

Depression is getting ahead of me

1•ppap3•28m ago•1 comments

Show HN: SiClaw – an open-source agent for debugging infrastructure incidents

https://siclaw.ai/
1•SherryWong•28m ago•0 comments

The Canonical Document

https://k2xl.substack.com/p/the-canonical-document
1•k2xl•28m ago•0 comments

Kovan: From Production MVCC Systems to Wait-Free Memory Reclamation

https://vertexclique.com/blog/kovan-from-prod-to-mr/
1•EvgeniyZh•30m ago•0 comments

MacBook Air M5 review: Almost perfect

https://www.tomsguide.com/computing/macbooks/macbook-air-m5-review
1•tosh•31m ago•2 comments

Is Srqcgx Safe? A Technical Audit of the "Wrapper" Fraud Architecture

1•cappyfjao•35m ago•0 comments

Just keep doing the bit (Karma Yoga Edition)

https://sankalp.bearblog.dev/just-keep-doing-the-bit-karma-yoga-edition/
1•tosh•36m ago•0 comments