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

AI-Free Free-to-Use Audio Shorts

https://onj.me/shorts/
1•cdvonstinkpot•28s ago•0 comments

Mortal Kombat Motion Picture Soundtrack 1995 [video]

https://www.youtube.com/watch?v=ZozxHpX4x8c
1•nomilk•51s ago•0 comments

Badgefor.me – Work from home. Look like you didn't

https://www.badgefor.me/
1•squalrus•5m ago•0 comments

Toms AI BackGround Remover Software

https://tomdahne.com/TomsBGRemover/pad/tomsbgremover.xml
1•ezimedia•5m ago•1 comments

.NET Aspire is now open source [video]

https://www.youtube.com/watch?v=crvgYrFYrrw
1•tartoran•6m ago•0 comments

Winapp, the Windows App Development CLI

https://blogs.windows.com/windowsdeveloper/2026/01/22/announcing-winapp-the-windows-app-developme...
1•thunderbong•10m ago•0 comments

I accidentally made probabilistic programming 30-200x faster

1•Aeowulf•11m ago•0 comments

Show HN: Cosmic AI – See your tech debt in dollars and fix it fast

https://cosmic-ai.pages.dev/
1•Saurabh_Kumar_•12m ago•0 comments

The unreasonable effectiveness of pattern matching

https://arxiv.org/abs/2601.11432
1•chbint•12m ago•0 comments

The AI Revolution in Coding: Why I'm Ignoring the Prophets of Doom

https://codingismycraft.blog/index.php/2026/01/23/the-ai-revolution-in-coding-why-im-ignoring-the...
2•codingismycraft•15m ago•0 comments

Elon Musk loves this. X article to video (open-source)

https://github.com/pooriaarab/x-article-to-video
1•pooriaarab•17m ago•0 comments

Why talking to LLMs has improved my thinking

https://philipotoole.com/why-talking-to-llms-has-improved-my-thinking/
2•otoolep•18m ago•0 comments

CIDR 2026 Proceedings

https://vldb.org/cidrdb/2026/
1•remywang•21m ago•0 comments

The Lost Art of XML

https://marcosmagueta.com/blog/the-lost-art-of-xml/
2•Curiositry•25m ago•0 comments

Over 1k Arizona teachers resigning plays a part in shortage

https://azpbs.org/horizon/2025/11/teacher-shortage-2/
2•toomuchtodo•26m ago•1 comments

Asciinema: Making Movies at the Command-Line

https://lwn.net/Articles/1053355/
1•signa11•28m ago•0 comments

Google decides what you see in Images and where invisible keywords are born

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

Microsoft investigating outage affecting Microsoft 365

https://www.cbsnews.com/news/microsoft-365-outage-outlook/
1•01-_-•32m ago•0 comments

Remotely unlocking an encrypted hard disk with systemd initrd on Arch

https://jyn.dev/remotely-unlocking-an-encrypted-hard-disk/
1•signa11•32m ago•0 comments

Show HN: Glean – RSS reader with AI-powered smart sorting and MCP integration

https://github.com/LeslieLeung/glean
1•3verest•36m ago•0 comments

Intel puts consumer chip production on back burner

https://www.theregister.com/2026/01/23/intel_earnings_q4_2025/
3•bovem•37m ago•0 comments

I Overengineered a Spinning Top

https://www.youtube.com/watch?v=Wp5NodfvvF4
3•bane•38m ago•0 comments

Man, these New York Times games are hard A computational perspective

https://arxiv.org/abs/2509.10846
1•PaulHoule•39m ago•0 comments

ChatGPT Self Portrait

https://thezvi.substack.com/p/chatgpt-self-portrait
1•gmays•39m ago•0 comments

Introducing: Postgres Best Practices

https://supabase.com/blog/postgres-best-practices-for-ai-agents
1•samuba•40m ago•0 comments

TikTok USDS Joint Venture LLC Established Under U.S. Regulatory Requirements

https://newsroom.tiktok.com/announcement-from-the-new-tiktok-usds-joint-venture-llc?lang=en
1•rzerowan•41m ago•1 comments

Thomas Edison: The Unintentional Founder of Hollywood

https://www.saturdayeveningpost.com/2021/03/thomas-edison-the-unintentional-founder-of-hollywood/
2•ronsor•42m ago•0 comments

Underground Resistance Aims to Sabotage AI with Poisoned Data

https://www.forbes.com/sites/craigsmith/2026/01/21/poison-fountain-and-the-rise-of-an-underground...
5•atomic128•46m ago•2 comments

The Cscript Style Guide – CScript is the standard C

https://github.com/domenukk/CScript
1•domenukk•46m ago•1 comments

How to Train an AI Agent for Command-Line Tasks with Synthetic Data and RL

https://developer.nvidia.com/blog/how-to-train-an-ai-agent-for-command-line-tasks-with-synthetic-...
1•gmays•47m ago•0 comments