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

Beasts of the Southern Wild

https://medium.com/luminasticity/on-beasts-of-the-southern-wild-40fc0ea39a2b
1•bryanrasmussen•2m ago•0 comments

Native Jellyfin Client for macOS

https://github.com/CustomIcon/Lume
1•CustomIcon•3m ago•1 comments

New Infinity Stealer malware grabs macOS data via ClickFix lures

https://www.bleepingcomputer.com/news/security/new-infinity-stealer-malware-grabs-macos-data-via-...
1•01-_-•5m ago•0 comments

Overestimation of microplastics potentially caused by scientists' gloves

https://news.umich.edu/nitrile-and-latex-gloves-may-cause-overestimation-of-microplastics-u-m-stu...
1•giuliomagnifico•7m ago•0 comments

Cicada Variant 2026: The New Covid Threat Emerging in Silence

https://comuniq.xyz/post?t=891
1•01-_-•8m ago•0 comments

Scion: Running Concurrent LLM Agents with Isolated Identities and Workspaces

https://googlecloudplatform.github.io/scion/overview/
2•smartius•13m ago•0 comments

ESP32-S31: 320MHz 2C RV32IMAFCP+CLIC, 512KB SRAM, GbE, 802.11ax, 61 GPIO

https://www.espressif.com/en/news/ESP32_S31_Release
1•topspin•14m ago•0 comments

What fork() Actually Copies

https://tech.daniellbastos.com.br/posts/what-fork-actually-copies/
1•thunderbong•19m ago•0 comments

Are LLMs a Dead End? [video]

https://www.youtube.com/watch?v=9IMV80GvBpU
2•pullshark91•22m ago•0 comments

How Developers use AI

https://vibecodingstats.com/
2•krenerd•23m ago•0 comments

Lithuanian Legislation as a Git Repo

https://github.com/Yiin/lt-teises-aktai
1•debesyla•24m ago•0 comments

Should you do a PhD? (2025)

https://neurofrontiers.blog/should-you-do-a-phd/
1•lentoutcry•26m ago•0 comments

DaVinci-MagiHuman: Open-source AI model for realistic video generation

https://firethering.com/davinci-magihuman-open-source-ai-video-model/
1•steveharing1•29m ago•0 comments

Working on Products People Hate

https://www.seangoedecke.com/working-on-products-people-hate/
2•herbertl•30m ago•0 comments

Vibe physics: The AI grad student

https://www.anthropic.com/research/vibe-physics
1•cl3misch•35m ago•0 comments

A minimal React shopping list app structured for Capacitor/iOS packaging

https://github.com/sangress/shopping-list
1•sangress_dev•37m ago•0 comments

From Agent to Domain Intelligence: A Self-Evolving Knowledge Engine

https://simaxiaoqian.substack.com/p/from-agent-to-domain-intelligence
1•qingant•48m ago•1 comments

City Skylines II: Office Evolution and City Stations Available Now

https://www.paradoxinteractive.com/games/cities-skylines-ii/news/office-evolution-and-city-statio...
1•doener•48m ago•0 comments

Debugging and Fixing Interaction to Next Paint (INP)

https://www.remoterocketship.com/advice/how-i-debugged-and-fixed-inp/
1•Lior539•50m ago•0 comments

Iceflake's First Patch for Cities Skylines 2 Is Good [video]

https://www.youtube.com/watch?v=pNL0iYIj0mA
1•doener•51m ago•0 comments

Lat.md: Agent Lattice: a knowledge graph for your codebase, written in Markdown

https://github.com/1st1/lat.md
1•doppp•54m ago•0 comments

Tried a New AI Image Tool for Real-World Design Work (Nano Banana Pro)

https://www.nanobananapro.org
1•nanobananapro•54m ago•0 comments

LinkedIn uses 2.4 GB RAM across two tabs

3•hrncode•55m ago•0 comments

How to use ETag header for optimistic concurrency

https://event-driven.io/en/how_to_use_etag_header_for_optimistic_concurrency/
1•birdculture•59m ago•0 comments

30 Years Ago, Robots Learned to Walk Without Falling

https://spectrum.ieee.org/honda-p2-robot-ieee-milestone
1•vinhnx•1h ago•0 comments

Show HN: Litmus – Run a Parallel Autonomous ML Research Org on Your OpenClaw

https://github.com/kuberwastaken/litmus
1•kuberwastaken•1h ago•0 comments

Which Future?

https://michaelnotebook.com/whichfuture/
1•vinhnx•1h ago•0 comments

ARC-AGI solver via Plücker geometry – 316 tasks solved with zero learning

https://github.com/khalildh/transversal-arc-solver
1•cubefox•1h ago•0 comments

Show HN: Ayush Agarwal the guy that built a better Stripe Alternative

https://snaprookies.org/blog/meet-ayush-agarwal-the-man-behind-dodopayment-a-stripe-alternative
1•RichardOdds•1h ago•0 comments

Solar is winning the energy race

https://www.dw.com/en/solar-is-winning-the-energy-race/a-76517556
17•doener•1h ago•3 comments