frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•9mo 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•9mo 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•9mo 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).

Intro to Concurrency – Processes and Threads

https://ayanmali.substack.com/p/processes-and-threads-discourse-on
1•ayanmali•2m ago•0 comments

The Universal Paperclip Clicker

https://corecursive.com/paperclip-clicker/
1•todsacerdoti•2m ago•0 comments

First 'practical PhDs' awarded in China – for products rather than papers

https://www.nature.com/articles/d41586-026-00356-8
1•sohkamyung•5m ago•0 comments

Free Bespoke Sewing Patterns – FreeSewing

https://freesewing.eu/
1•hamid914•6m ago•0 comments

The Anthropic Hive Mind

https://steve-yegge.medium.com/the-anthropic-hive-mind-d01f768f3d7b
1•rsaarelm•6m ago•0 comments

Marine biologists discover 28 new deep sea species–and an old VHS tape

https://www.popsci.com/environment/new-deep-sea-species-argentina/
2•layer8•8m ago•0 comments

Git-Wt: Worktrees Simplified

https://gabri.me/blog/git-wt
1•ahmedelgabri•11m ago•0 comments

Rust by Example

https://doc.rust-lang.org/rust-by-example/index.html
2•Brysonbw•14m ago•0 comments

ADHD became a multimillion-pound industry for private equity

https://www.thetimes.com/uk/healthcare/article/how-adhd-became-a-multimillion-pound-industry-for-...
1•petethomas•15m ago•0 comments

Vlang 0.5

https://github.com/vlang/v/releases/tag/0.5
1•seeg•16m ago•0 comments

Best OpenClaw Skills Every Developer Needs in 2026

https://transcriptapi.com/blog/best-openclaw-skills-developer
1•nikhonit•17m ago•0 comments

Building a C Compiler from Scratch with AI-Driven Development

https://twitter.com/moonbitlang/status/2019716138255646785
2•tamnd•18m ago•0 comments

Choan Gàlvez Fan Club

https://forum.ukuleleunderground.com/threads/choan-g%C3%A0lvez-fan-club.171951/
1•severine•20m ago•0 comments

The Ultimate Guide to Reduce Screen Time: CBT (part 1)

https://dachi.substack.com/p/the-ultimate-guide-to-reduce-screen
1•antoferra•21m ago•0 comments

We switched to a 5x cheaper LLM. Our costs went up

https://gitar.ai/blog/we-switched-to-a-5x-cheaper-llm-our-costs-went-up
1•kageiit•22m ago•1 comments

Ask HN: Systems programmers, what AI tools do you use?

1•NullCascade•26m ago•1 comments

Throughput Upgrade (With Train Illustrations) Blog

https://blog.healthchecks.io/2025/07/throughput-upgrade-with-train-illustrations/
1•tosh•30m ago•0 comments

GeoGPT – Chat-controlled GIS app built from a Jupyter Notebook

https://mljar.com/blog/chatgpt-gis-app-jupyter-notebook/
1•pplonski86•31m ago•0 comments

Superposition Yields Robust Neural Scaling

https://arxiv.org/abs/2505.10465
1•kioku•35m ago•0 comments

Canada Warms Up to EVs from China

https://www.caranddriver.com/news/a70188525/chinese-evs-north-america/
1•breve•35m ago•0 comments

Khosrow Alikordi: Lawyer for Mahsa Amini

https://en.wikipedia.org/wiki/Khosrow_Alikordi
1•ukblewis•37m ago•0 comments

Free async standup bot for Slack – looking for feedback

https://www.vereda.ai/free-slack-standup-bot
1•awightman•37m ago•1 comments

AI Incident Roundup – November and December 2025 and January 2026

https://incidentdatabase.ai/blog/incident-report-2025-november-december-2026-january/
2•YeGoblynQueenne•41m ago•0 comments

TikTok hit with charges by EU for its addictive features

https://www.reuters.com/business/media-telecom/tiktok-hit-with-charges-breaching-eu-online-conten...
5•hackerbeat•44m ago•0 comments

Signy: Signed URLs for Small Devices

https://github.com/golioth/signy
1•hasheddan•45m ago•0 comments

Shadcn/Create in Figma

https://www.shadcndesign.com/blog/shadcn-create-in-figma
1•figmaster•46m ago•0 comments

Show HN: Langraph Networks as Equations

https://github.com/kummahiih/python-langgraph-equations
2•kummap•47m ago•0 comments

Bui – TUI for painless Bubblewrap sandboxing

https://smaller.fish/posts/bubblewrap_tui
2•smallerfish•47m ago•0 comments

John Haugeland on the failure of micro-worlds

https://blog.plover.com/tech/gpt/micro-worlds.html
1•robinhouston•51m ago•0 comments

EC preliminarily finds TikTok's addictive design is Digital Services Act breach

https://ec.europa.eu/commission/presscorner/home/en
2•u1hcw9nx•53m ago•3 comments