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

Why open AI models have become a matter of American national security [Italian]

https://www.dday.it/redazione/58170/perche-i-modelli-ia-open-sono-diventati-una-questione-di-sicu...
1•lorenzomx•7s ago•0 comments

The Red Cross plans to extend its protection to cyberspace

https://www.swissinfo.ch/eng/international-geneva/the-red-cross-plans-to-extend-its-protection-to...
1•giuliomagnifico•1m ago•0 comments

Show HN: Panorama Markdown – Markdown dialect and editor for academic papers

https://github.com/panorama-lab/markdown
1•wang_zuo•2m ago•0 comments

Porting Super Hexagon to the Playdate

https://captnemo.in/superhexagon/
1•chmaynard•3m ago•0 comments

Show HN: A udev implementation in Guile Scheme

https://codeberg.org/goodev/goodev
2•mbakke•4m ago•0 comments

Show HN: Wasp, a full-stack web framework, replaces its DSL with TypeScript

https://wasp.sh/blog/2026/06/15/wasp-typescript-spec
1•matijash•5m ago•0 comments

HTTP Message Signatures with curl

https://daniel.haxx.se/blog/2026/07/27/http-message-signatures-with-curl/
2•chmaynard•9m ago•0 comments

Guide to the Kimi DeltaNet Family of linear attention

https://blog.doubleword.ai/you-could-have-come-up-with-kimi-delta-attention
1•kkm•10m ago•0 comments

Young Adults Are Letting AI Do Their Talking for Them–Even in Person

https://www.wsj.com/tech/ai/ai-chatbot-in-person-social-interactions-d1cb6831
3•thm•11m ago•0 comments

Show HN: Mapify Your Repository

https://codemap.gitbiased.com
1•skyfantom•11m ago•0 comments

Meta Got Everything It Wanted in a Secret Louisiana Data Center Deal

https://www.nytimes.com/2026/07/27/technology/meta-data-center-louisiana.html
1•jryio•13m ago•0 comments

Convergence in LLM Quality and Slowdown in LLM Improvement

https://braddelong.substack.com/p/convergence-in-llm-quality-and-slowdown
1•Anon84•18m ago•0 comments

Elevated errors on Claude Opus 5

https://status.claude.com/incidents/mfdtrknpxghq
2•croemer•23m ago•1 comments

Endor Labs' AI SAST Finds Zero Day Memory-Y

1•usman_oiu•23m ago•0 comments

Show HN: 100% Free Indian Railways API

https://traintrack.stupidlabs.lol/
1•freakynit•29m ago•0 comments

Claude Code getting "API Error: 529 Overloaded"

3•croemer•30m ago•2 comments

Show HN: Turn SSH X11 Forward to WebSocket – remote apps flow to you workstation

1•kbradero•31m ago•0 comments

Google Chrome Arrives on ARM64 Linux, Widevine DRM Included

https://www.omgubuntu.co.uk/2026/07/chrome-arm64-linux-available
2•twapi•36m ago•0 comments

Codex ported Age of Empires II to the browser

https://twitter.com/ryanshahine/status/2081697787683487882
1•ryanshahine•37m ago•0 comments

Show HN: A Graveyard of Startups

https://startupgrave.vercel.app
2•hito20•38m ago•3 comments

Commercial AI APIs Blocked Hugging Face's Forensic Analysis

https://www.vincentschmalbach.com/commercial-ai-apis-blocked-hugging-face-forensic-analysis/
1•vincent_s•38m ago•0 comments

Understanding the Linux Kernel: The VFS

https://internals-for-interns.com/posts/linux-kernel-vfs/
1•valyala•39m ago•0 comments

Comparing the Italian and Danish Music Industries

https://www.michelecoscia.com/?p=2562
2•mikk14•40m ago•0 comments

RavynOS: An early-stage (pre-alpha) open-source operating system based on Darwin

https://ravynos.com/
1•arm•42m ago•0 comments

How is the Bun Rewrite in Rust going?

https://lockwood.dev/ai/2026/07/27/how-is-the-bun-rewrite-in-rust-going.html
22•tomlockwood•43m ago•6 comments

Make Reviews Possible Again with This One Simple Trick

https://silky.github.io/posts/reviews-one-simple-trick.html
1•signa11•43m ago•0 comments

Ask HN: What do you use to monitor cron jobs and queue workers?

3•HarunRRayhan•46m ago•1 comments

One Leading Dash Turned Tailscale SSH Access into a Root Session

https://www.vincentschmalbach.com/tailscale-ssh-leading-dash-root/
2•vincent_s•49m ago•0 comments

Ukraine's Kill Zone

https://www.reuters.com/graphics/UKRAINE-CRISIS/KILL-ZONE/znpnojmknvl/
3•stared•53m ago•0 comments

Free engagement-rate calculator for creators and brands

https://collabios.com/en/tools/engagement-rate-calculator
1•ghassendaoud•54m ago•0 comments