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

My journey from foreign correspondent to Uber driver in Trump's America

https://stevescherer.substack.com/p/my-journey-from-foreign-correspondent
1•only_in_america•48s ago•0 comments

Show HN: Shadowscan – see what an AI agent can access on your machine

https://github.com/LakshmiSravyaVedantham/shadowscan
1•sravyavedantham•49s ago•0 comments

Claude Code building 100 mini games with one prompt (5.3M tokens)

https://twitter.com/amgauge/status/2031809325375897931
1•august-•1m ago•0 comments

Sensational news. Fintech has published banking secrets for public access

https://sfg.media/en/a/monobank-accuses-client-collaboration-slovenian-flag-mistake/
1•Kizert•2m ago•0 comments

Vitalina: Export Your Apple Health Data as CSV/JSON

https://apps.apple.com/us/app/health-data-exporter-vitalina/id6759179139
2•MegaMaddin•6m ago•1 comments

Digital Democracy

https://calmatters.digitaldemocracy.org/
2•jruohonen•7m ago•0 comments

Kishida Prize crowns wordsmiths in the theater world

https://www.japantimes.co.jp/culture/2026/02/26/stage/kishida-prize-theater-japan/
3•PaulHoule•10m ago•0 comments

Zoox starts mapping Dallas and Phoenix for its robotaxis

https://techcrunch.com/2026/03/09/zoox-starts-mapping-dallas-and-phoenix-for-its-robotaxis/
2•gmays•11m ago•0 comments

Surgical Repair of Collapsed Attention Heads in ALiBi Transformers

https://arxiv.org/abs/2603.09616
3•palmerschallon•11m ago•1 comments

Why Escalation Favors Iran

https://www.foreignaffairs.com/iran/why-escalation-favors-iran
6•decimalenough•12m ago•1 comments

Thanks, ChatGPT

https://www.robpanico.com/articles/display/?entry_short=thanks-chatgpt
2•retrocog•12m ago•1 comments

Wired headphone sales are exploding. What's with the Bluetooth backlash?

https://www.bbc.com/future/article/20260310-wired-headphones-are-better-than-bluetooth
14•billybuckwheat•14m ago•2 comments

Feature Unrequest

https://kudmitry.com/articles/feature-unrequest/
3•skwee357•16m ago•0 comments

OrthoScience – Hybrid search engine for 500K+ orthopedic translational research

https://orthoarchives.com/en/orthoscience/search
2•DrMeric•16m ago•1 comments

Don't post generated/AI-edited comments. HN is for conversation between humans.

https://news.ycombinator.com/newsguidelines.html#generated
120•usefulposter•22m ago•23 comments

An Update from First Board Chair Laurie Leshin

https://www.firstinspires.org/about/press-room/an-update-from-first-board-chair-laurie-leshin
2•ndrake•22m ago•0 comments

Show HN: R2 Desk Pro – a vault-locked desktop client for CF R2 (Tauri/Rust)

https://r2desk.greeff.dev
2•pio_greeff•23m ago•0 comments

A record share of U.S. workers now have access to paid leave

https://19thnews.org/2026/03/paid-leave-policies-united-states/
3•mooreds•23m ago•0 comments

I'm glad the Anthropic fight is happening now

https://www.dwarkesh.com/p/dow-anthropic
3•emschwartz•23m ago•0 comments

Over puppy yoga? Try it with snakes

https://text.npr.org/nx-s1-5743865
2•mooreds•23m ago•0 comments

Do You Need to Wash New Clothes Before Wearing Them?

https://www.nytimes.com/2026/03/10/well/wash-new-clothes-before-wearing.html
3•mooreds•23m ago•0 comments

Buying a Laptop Online Is a Broken Experience (2018)

https://blog.raed.dev/posts/buying_laptop_online_broken_experience/
2•Raed667•25m ago•0 comments

We Built a Linux Kernel Mailing List Front End

https://nexus-kb.com/blog/nexus-kb-announcement/
3•tansanrao•27m ago•0 comments

Ask HN: Developers still enjoying development after AI?

3•aavci•27m ago•3 comments

The Internet Has 100M Shops and No Front Door

https://askucp.com/blog
2•possiblelion•27m ago•0 comments

OmniCode: A Benchmark for Evaluating Software Development Agents

https://arxiv.org/abs/2602.02262
2•foma-roje•29m ago•0 comments

From IDEs to AI Agents with Steve Yegge [video]

https://www.youtube.com/watch?v=aFsAOu2bgFk
2•claudiug•29m ago•1 comments

Show HN: Daub – A rendering spec for AI-generated UIs (two files, no build step)

https://daub.dev
2•kulesh•32m ago•0 comments

FBI warns Iran wanted to attack California with drones

https://www.sfchronicle.com/california/article/iran-drones-west-coast-attack-22071032.php
4•babelfish•32m ago•0 comments

The Passion of Will Self

https://www.newstatesman.com/culture/books/2026/03/the-passion-of-will-self
3•apollinaire•34m ago•0 comments