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

The day the father of computing Federico Faggin described my universe

https://evertonb.substack.com/p/the-day-the-father-of-computing-federico
1•EvertonB•1m ago•0 comments

Sliceland [Game]

https://strangestloop.io/sliceland/
1•tasshin•4m ago•0 comments

Google's Data Center Buildout Could Top $1T

https://www.forbes.com/sites/richardnieva/2026/03/02/googles-data-center-buildout-could-top-1-tri...
1•bookofjoe•5m ago•0 comments

What Pages Should You Monitor on a Competitor Website?

https://adversa.io/blog/what-pages-should-you-monitor-on-a-competitor-website/
1•robinweller•6m ago•0 comments

Microsoft BitNet: 100B Param 1-Bit model for local CPUs

https://github.com/microsoft/BitNet
3•redm•7m ago•0 comments

Simplifying Expressions in SymPy

https://www.johndcook.com/blog/2026/03/10/simplifying-expressions-in-sympy/
2•ibobev•8m ago•0 comments

Uprooted – voices of student homelessness comic

https://smu-uprooted.squarespace.com
1•rathboma•8m ago•0 comments

Inverted U-shaped relationship between sleep duration and phenotypic age

https://www.nature.com/articles/s41598-024-56316-7
1•RickJWagner•8m ago•1 comments

The Axiom of Univalence

https://bartoszmilewski.com/2026/03/10/the-axiom-of-univalence/
1•ibobev•9m ago•0 comments

Examples for the tcpdump and dig man pages

https://jvns.ca/blog/2026/03/10/examples-for-the-tcpdump-and-dig-man-pages/
1•ibobev•10m ago•0 comments

I put agentic AI through a real engineering stress test. Here's what I learned

https://www.anthonyputignano.com/p/i-put-agentic-ai-through-a-real-engineering
1•anthonyp•13m ago•0 comments

Meta Ramps Up Efforts to Disrupt Industrialized Scamming

https://www.wired.com/story/meta-ramps-up-efforts-to-disrupt-industrialized-scamming/
1•Brajeshwar•13m ago•1 comments

Ask HN: How could I optimize the performance of my web Liquid (Gl)ass project?

1•winaviation•14m ago•0 comments

Generate videos from simple ideas using NovaVideo

https://nova-video.onesolo.app
1•henrybit•14m ago•1 comments

Study: Human brain is not capable of performing two tasks simultaneously

https://pressemitteilungen.pr.uni-halle.de/index.php?modus=pmanzeige&pm_id=6040
1•giuliomagnifico•15m ago•0 comments

So You Want to Do Agentic Development

https://taoofmac.com/space/blog/2026/03/08/2130
1•rcarmo•15m ago•0 comments

Htmx and ECharts: tiny SSE/polling extension for live charts

https://github.com/marcingolenia/htmx-echarts
1•oO0Jinx0Oo•16m ago•1 comments

Boosting Android Performance: Introducing AutoFDO for the Kernel

https://android-developers.googleblog.com/2026/03/BoostingAndroid%20PerformanceIntroducingAutoFDO...
1•fastest963•18m ago•0 comments

What Makes a Successful Standard?

https://sphericalcowconsulting.com/2026/02/24/what-makes-a-successful-standard/
2•mooreds•22m ago•0 comments

Upcoming Vote on Chat Control: Renew Deal Is Worse Than Rejected Draft Report

https://www.patrick-breyer.de/en/upcoming-vote-on-chat-control-new-sd-epp-and-renew-deal-is-worse...
2•latexr•22m ago•0 comments

Mouth Taping for Sleep: Does It Work? (2025)

https://www.sleepfoundation.org/snoring/mouth-taping-for-sleep
1•mooreds•22m ago•0 comments

The Corporate Miscreants Driving the Affordability Crisis

https://newrepublic.com/post/207422/corporate-miscreants-driving-affordability-crisis
1•mooreds•23m ago•1 comments

The Fort Strength Training Wearable Tracks Your Sets (2026)

https://www.wired.com/story/fort-strength-training-wearable-launch/
1•joozio•23m ago•0 comments

Show HN: YC W26 AgentMBOX agent self-onboarding mailboxes

https://agentmbox.com
1•jpzk•23m ago•0 comments

1kB Club

https://1kb.club/
2•TigerUniversity•23m ago•0 comments

Covenant-72B: Pre-Training a 72B LLM with Trustless Peers Over-the-Internet

https://twitter.com/tplr_ai/status/2031388295972929720
1•rzk•24m ago•0 comments

WinGet abused to deliver malicious payloads

https://blog.compass-security.com/2026/03/winget-desired-state-initial-access-established/
1•uneven9434•26m ago•0 comments

Remembra – Open-source semantic memory for AI agents

https://github.com/remembra-ai/remembra
1•remembradev•27m ago•1 comments

NVSentinel: Nvidia's open-source GPU resilience system for Kubernetes

https://github.com/NVIDIA/NVSentinel/
1•mchmarny•27m ago•1 comments

Show HN: gists.sh – Beautiful Viewer for GitHub Gists

https://gists.sh
1•linuz90•28m ago•2 comments