frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•1y 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•1y 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•1y 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).

Show HN: Cpcp – A smarter pbcopy for macOS that strips ANSI and newlines

https://github.com/Vansh-j/CopyCopy
1•vansh-j•3m ago•1 comments

Show HN: I've created a platform to help indie hackers with idea validation

https://www.validatehunt.com
2•gxara•11m ago•0 comments

Mecha Chameleon Games browser guide hub

https://mechachameleon.games/
3•zlonmask•17m ago•0 comments

Stop Googling.Track Team Across Timezones with Full Screen Always-On World Clock

https://citytime.io/fullscreen-clock
4•rajsuper123•24m ago•0 comments

CueBench for Developers is live: score how well you drive coding agents

https://app.cuebench.dev
3•DillonMehta•30m ago•0 comments

Proof That the Unraveling of MAGA Has Begun [video][46 Mins]

https://www.youtube.com/watch?v=x_Y7Zf4Nhe8
2•Bender•30m ago•0 comments

You take AI, I'll take my iPod (if I can find it)

https://news.harvard.edu/gazette/story/2026/06/ai-has-lots-of-people-digging-out-their-ipods/
2•gnabgib•31m ago•0 comments

IP Crawl: Exposing the Open Webcam Crisis

https://alec.is/posts/ip-crawl-exposing-the-massive-open-webcam-crisis/
2•gnabgib•33m ago•1 comments

The "Triple Lock" Bug: How Hardcoded Constants in Si Units Break Relativity

https://zenodo.org/records/21025715/files/Axiomatic_Error_of_Modern_Metrology_and_Local_Gravity_A...
2•CitizenKorea•35m ago•0 comments

One tired 16 year GMC technician

http://www.oemcommand.com
2•nextonmags•35m ago•3 comments

Midjourney Seeks to Reveal Studios' Use of AI in High-Stakes Copyright Battle

https://variety.com/2026/film/news/midjourney-studios-ai-copyright-discovery-1236800902/
2•minimaxir•37m ago•0 comments

The Military and the Republic

https://www.foreignaffairs.com/united-states/military-and-republic-charles-q-brown
5•Jtsummers•51m ago•0 comments

Simple White Line Is America's Greatest Unsung Innovation

https://www.wsj.com/business/white-line-road-invention-america-250-8ce6bb89
2•JumpCrisscross•51m ago•0 comments

Should agent orchestrators stay dumb while submodels go deep?

https://curious-hiker.blogspot.com/2026/07/keep-orchestrator-dumb.html
2•stephencoxza•55m ago•0 comments

You're Weirder Than You Think

https://www.atvbt.com/youre-weirder-than-you-think/
3•zdw•57m ago•0 comments

EdgeBench: Unveiling Scaling Laws of Learning from Real-World Environments [pdf]

https://edge-bench.org/paper.pdf
2•mfiguiere•58m ago•0 comments

SecretSpec 0.13: SDKs for Python, Node.js, Go, Ruby, and Haskell

https://secretspec.dev/blog/secretspec-0-13-sdks/
2•domenkozar•1h ago•0 comments

MSI Center – How to gain SYSTEM privileges in seconds

https://mrbruh.com/msicenter/
22•MrBruh•1h ago•5 comments

Did you know your code is overpaying for AI?

https://tokendiet.dev/
3•eMoka•1h ago•1 comments

A fleshed-out IPv5 proposal

4•bigcityslider•1h ago•2 comments

The Mailgun Routes alternative for developers – MailKite

https://mailkite.dev/blog/mailgun-routes-alternative/
2•bucabay•1h ago•0 comments

Show HN: Fortress – open-source Chromium that keeps browser agents unblocked

https://github.com/tiliondev/fortress
7•arhamislam5766•1h ago•0 comments

Context graphs: how AI agents remember why decisions were made

https://nanonets.com/blog/what-is-a-context-graph/
3•vitaelabitur•1h ago•0 comments

I Could Kill You with a Consumer Drone

https://www.defenseone.com/ideas/2017/06/i-could-kill-you-consumer-drone/139012/
18•bookofjoe•1h ago•14 comments

Making a Simulation Game – Part 1: The Agent Simulation Engine

https://scarlet.engineering/blog/making-simulation-game-part-1-the-engine/
2•poga•1h ago•0 comments

To tab or not to tab

https://arxiv.org/abs/2606.30549
3•azhenley•1h ago•0 comments

Bitcask - A Log-Structured Hash Table for Fast Key/Value Data (2010) [pdf]

https://riak.com/assets/bitcask-intro.pdf
2•gregsadetsky•1h ago•0 comments

SkySynth

https://skyviewer.app/skysynth
3•akkartik•1h ago•0 comments

Agent Empire: A interactive game to get started on what agent pattern to chose

https://agent-empire.products.sayantan.sh/
2•Morningstar317•1h ago•0 comments

China's ByteDance discovers new scaling law that could sustain AI boom

https://www.scmp.com/tech/big-tech/article/3359373/chinas-bytedance-discovers-new-scaling-law-cou...
4•dstala•1h ago•0 comments