frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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

Nairobi became a nexus for the black market in giant harvester ants

https://www.theguardian.com/environment/ng-interactive/2026/may/13/smuggled-illegal-global-trade-...
1•Michelangelo11•3m ago•0 comments

Scryve-tools – Unified wallet auth for CKB, EVM, and BTC in one NPM package

https://github.com/tecmeup123/scryve-tools
1•scryve•10m ago•0 comments

The Earliest Known Dentistry Wasn't Done by Our Species

https://www.sciencealert.com/the-earliest-known-dentistry-wasnt-done-by-our-species
2•janandonly•14m ago•0 comments

Show HN: Sanjaya – Academic paper discovery and extraction (OpenAlex/Scrapy)

https://sanjaya-six.vercel.app/
1•oug-t•16m ago•1 comments

Rest alone doesn't fix burnout. Here's the structural reason why

https://www.sharks-coaching.com/content-hub/emotions-and-stress-management/how-to-recover-from-bu...
2•roxxon_1•17m ago•0 comments

Show HN: One Markdown File to Set Up Claude, Codex, Cursor and Copilot

https://github.com/kernalix7/ai-project-setup
2•kernalix7•18m ago•0 comments

Show HN: Domain DMARC Checker

https://dmarcdefender.io/tools/domain-check
3•c0nrad•19m ago•0 comments

Overseas fakers using AI videos to push a narrative of UK decline, BBC finds

https://www.bbc.co.uk/news/articles/ckgpyn30dp3o
3•dijksterhuis•20m ago•0 comments

Show HN: Mailenc – Test if your PGP email setup works

https://mailenc.org/
2•soeckly•20m ago•0 comments

AI Will Not Make Everyone More Productive

https://www.vincentschmalbach.com/ai-will-not-make-everyone-more-productive/
4•vincent_s•23m ago•0 comments

Britain's latest civil servant is a chatbot trained on Gov.uk misery

https://www.theregister.com/public-sector/2026/05/15/britains-latest-civil-servant-is-a-chatbot-t...
2•jjgreen•23m ago•0 comments

Ask HN: How do you listen to research papers? (TTS workflows for commutes)

2•vinxu•27m ago•0 comments

Ways in which GenAI has changed the way I write code so far

https://lengrand.fr/ways-in-which-genai-has-changed-my-coding-so-far/
2•jlengrand•28m ago•0 comments

Geography is four-dimensional

https://sive.rs/4d
3•galfarragem•29m ago•0 comments

Show HN: My time has come – let Claude Code wrap up before 5-hour usage runs out

https://github.com/JinBa1/my-time-has-come
2•BuyG1n•30m ago•1 comments

Stochastic Parrots: Frequently Unasked Questions

https://medium.com/@emilymenonbender/stochastic-parrots-frequently-unasked-questions-49c2e7d22d11
1•edent•35m ago•0 comments

Node 26.1.0 – experimental node:FFI module

https://nodejs.org/en/blog/release/v26.1.0
1•tosh•35m ago•0 comments

Best Realtime Voice Agent in 2026

https://techstackups.com/articles/best-voice-agent-2026/
1•ritzaco•38m ago•0 comments

Tech groups score win on clean energy rules for gas-powered data centres

https://www.ft.com/content/2ed922bb-266f-45cc-8930-c4ab5422bf95
1•zekrioca•40m ago•1 comments

Giggle for Girls app discriminated against trans woman; judges double damages

https://www.theguardian.com/australia-news/2026/may/15/giggle-for-girls-app-discriminated-against...
1•prawn•42m ago•0 comments

Apple's iPhone 18 Modem Switch Comes with a Quiet Privacy Benefit

https://www.macrumors.com/2026/05/14/iphone-18-pro-modem-benefits/
1•dabinat•42m ago•0 comments

Galileo's Basilisk

https://hexmhell.writeas.com/galileos-basilisk
1•l0b0•46m ago•0 comments

RelaxAI – UK sovereign LLM inference at 80% cheaper than OpenAI/Claude

https://relax.ai/docs
23•benjamintnorris•49m ago•9 comments

Show HN: RAG-LCC – config-driven RAG framework for fast experimentation

https://github.com/HarinezumIgel/RAG-LCC
1•HarinezumIgel•53m ago•0 comments

The Biggest Exploit in Trackmania History [video]

https://www.youtube.com/watch?v=BojXHjeFIdk
1•NohatCoder•54m ago•0 comments

Show HN: Find the best local LLM for your hardware, ranked by benchmarks

https://github.com/Andyyyy64/whichllm
5•andyyyy64•57m ago•0 comments

Citroën metropolis concept car (2010)

https://www.citroenet.org.uk/prototypes/metropolis/metropolis1.html
2•Alifatisk•58m ago•0 comments

Show HN: Zero-ETL elastic-grade search over remote data (Parquet, Iceberg, JSON)

https://github.com/serenedb/serenedb
3•gnusi•59m ago•0 comments

Propmpt-genned Rust shell is 13x the Ghostty size

2•ykurtov•1h ago•1 comments

How robots are learning to walk – Marco Hutter, ETH Zürich [video]

https://www.youtube.com/watch?v=Wmn7uPLFXm8
1•o4c•1h ago•0 comments