frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Age of the Captain

https://en.wikipedia.org/wiki/Age_of_the_captain
1•downboots•2m ago•0 comments

Science, Optics and Youline – Prehistory to 999 Ad

https://micro.magnet.fsu.edu/optics/timeline/pre1000.html
1•andsoitis•2m ago•0 comments

De Bruijn Graph

https://en.wikipedia.org/wiki/De_Bruijn_graph
1•downboots•3m ago•0 comments

Code Wiki: Accelerating your code understanding

https://developers.googleblog.com/en/introducing-code-wiki-accelerating-your-code-understanding/
2•msolujic•8m ago•0 comments

Meta and Google Discuss Deploying TPUs in Meta Datacenters Starting 2027

https://finance.yahoo.com/news/meta-google-discuss-tpu-deal-233823637.html
2•mfiguiere•9m ago•0 comments

Who first understood how eyes work?

https://www.occuity.com/post/who-first-understood-how-eyes-work
1•andsoitis•10m ago•0 comments

OpenAI's AI gadget now has a prototype

https://sherwood.news/tech/altman-openais-ai-gadget-now-has-a-prototype/
1•RyanShook•26m ago•0 comments

Computer Science and Game Theory: A Conversation – Timothy Roughgarden [video]

https://www.youtube.com/watch?v=cKeuB4B1Ww8
2•vismit2000•28m ago•0 comments

AI or You? Who is the one who can't get it done?

https://medium.com/@ahintze_23208/ai-or-you-who-is-the-one-who-cant-get-it-done-1cb60b9a2dbb
1•timschmidt•31m ago•0 comments

Ask HN: Why do maintainers spend time reviewing my code?

1•dils•31m ago•0 comments

Show HN: Kibun (気分) – a decentralized status.cafe alternative I made

https://www.kibun.social/
4•lakshikag•33m ago•0 comments

Unexpected 'Zig-Zag' Structures Discovered in Earth's Magnetic Field

https://www.sciencealert.com/unexpected-zig-zag-structures-discovered-in-earths-magnetic-field
1•ashishgupta2209•39m ago•0 comments

The AI Invasion of Knitting and Crochet

https://www.plagiarismtoday.com/2025/11/24/the-ai-invasion-of-knitting-and-crochet/
3•cardamomo•42m ago•0 comments

Why investors are increasingly fatalistic

https://www.economist.com/finance-and-economics/2025/11/23/why-investors-are-increasingly-fatalistic
3•jcartw•42m ago•2 comments

Quantum computing production expands with Shenzhen's factory project in China

https://dig.watch/updates/quantum-computing-production-expands-with-shenzhens-factory-project-in-...
1•rguiscard•47m ago•1 comments

Stanford Agentic Reviewer

https://paperreview.ai/
1•kpw94•49m ago•1 comments

Webfoundry gets GPT 5.1 Codex HTML generation through voice assistant

https://www.webfoundry.app/
2•guiprav•52m ago•1 comments

The price of gold: In Venezuela, mining threatens Indigenous Pemón

https://news.mongabay.com/2025/11/the-price-of-gold-in-venezuela-mining-threatens-indigenous-pemon/
1•PaulHoule•55m ago•0 comments

Linux compatible reliable C# boost for NATS messaging

https://github.com/nats-io/nats.net
1•northlondoner•57m ago•0 comments

Show HN: NBPro – NanoBanana Pro prompt library (100 prompts)

https://nbpro.org/
1•qzcanoe•58m ago•0 comments

Rare Layoffs at Apple Impact Dozens in Sales Roles

https://www.macrumors.com/2025/11/24/apple-eliminates-sales-roles/
3•mgh2•59m ago•0 comments

Towards Better Word

https://aartaka.me/better-word.html
2•freediver•1h ago•0 comments

Nvidia's rebuttal to Michael Burry's criticism

https://www.businessinsider.com/read-nvidia-rebuttal-michael-burry-criticism-other-claims-ai-boom...
1•mgh2•1h ago•0 comments

MetaOCaml: Ten Years Later System Description

https://www.sciencedirect.com/science/article/pii/S0167642325001364
1•matt_d•1h ago•0 comments

Seekdb: The AI-Native Search Database

https://github.com/oceanbase/seekdb
1•zyh888•1h ago•0 comments

The lesson I learnt in the USSR that still fools millions

https://youtu.be/gI1VcTVmqA8
2•burnt-resistor•1h ago•1 comments

Show HN: I Built a Small Startup Idea Validation Platform

https://b4zero.vercel.app/
1•mhpro15•1h ago•0 comments

Four Top Contenders at Apple to Succeed Tim Cook

https://www.wsj.com/tech/apple-ceo-tim-cook-successors-67b1bf84
1•sebastian_z•1h ago•0 comments

China's Xi Jinping Raises Future of Taiwan in Call with Donald Trump

https://www.theguardian.com/world/2025/nov/25/china-taiwan-xi-jinping-call-with-donald-trump
3•drivebyhooting•1h ago•0 comments

CS 61A: Structure and Interpretation of Computer Programs

https://cs61a.org
1•swatson741•1h ago•0 comments
Open in hackernews

Ask HN: Help with doing statistics over machine code

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