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

MathLapse: Constructions by pin-and-string: conics [video]

https://www.youtube.com/watch?v=mldZ_7QwLvs
1•vismit2000•36s ago•0 comments

American Retirees on Different Incomes Rely on Social Security

https://www.nytimes.com/2026/10/12/business/social-security-income-retirement-benefits.html
1•toomuchtodo•1m ago•1 comments

Solar surpasses nuclear power globally for first time – pv magazine Global

https://www.pv-magazine.com/2026/09/29/solar-surpasses-nuclear-power-globally-for-first-time/
2•xbmcuser•1m ago•0 comments

Scientists Reveal How Pancreatic Cancer Evolves to Evade Treatment

https://today.ucsd.edu/story/scientists-reveal-how-pancreatic-cancer-evolves-to-evade-treatment
1•gmays•2m ago•0 comments

Ask HN: How do I stop Gemini Live from asking."Would like to know more about..?"

1•orsenthil•3m ago•0 comments

Null Surprises

https://wizardzines.com/comics/null-surprises/
1•vismit2000•4m ago•0 comments

Ask HN: Why people do not want to believe weight loss is possible without GLPs?

1•faangguyindia•5m ago•1 comments

I built a Telegram bot that tells me when watched Instagram accounts post

https://hikerapi.com/
1•SAdfzVGBXCNVB•5m ago•0 comments

Making Chicken Transparent Using Dorito Dust

https://chillphysicsenjoyer.substack.com/p/making-chicken-transparent-using
1•crescit_eundo•6m ago•0 comments

Using the brella to re-create Reddit

https://ahptour.com/blog/using-the-brella-to-re-create-reddit/
2•andrewfromx•8m ago•0 comments

Show HN: Esp32sim – Run ESP32 firmware in the browser

https://github.com/mikroverk/esp32sim
1•joakimeriksson•11m ago•0 comments

New Tesla Roadster: My Honest Reaction

https://www.youtube.com/watch?v=scwlR0QHGOk
1•Betelbuddy•13m ago•0 comments

Life After Death?

https://pudding.cool/2026/10/lifeafter/
1•gmays•16m ago•0 comments

Seminal Book Auction at Sotheby's

https://www.sothebys.com/en/series/reason-and-revolution-extraordinary-works-from-a-distinguished...
1•herodotus•16m ago•1 comments

Nexus-Q update: V4 native back end is now in main

https://nexus-q.link/
1•lecodev•17m ago•0 comments

Takto open-source hand exoskeleton

https://github.com/molanocortes/takto-one/tree/main
2•andsoitis•19m ago•1 comments

Internet access a fundamental right for all age groups – India's Supreme Court

https://scroll.in/latest/1096477/children-have-fundamental-right-to-use-internet-says-sc
2•drewfax•22m ago•1 comments

Are You Sure Your LLM Is Sure?

https://arxiv.org/abs/2610.22139
2•Betelbuddy•23m ago•1 comments

Stop ATSC 3.0 DRM

https://blog.velocifyer.com/Posts/7,Stop%20ATSC%203.0%20DRM/
1•Velocifyer•24m ago•0 comments

Microsoft AI chief says the company beat OpenAI's models, using less compute

https://www.businessinsider.com/microsoft-ai-ceo-new-model-beats-openai-using-less-compute-2026-10
1•khalidkhair•24m ago•2 comments

Academics should self publish textbooks

https://andrewpwheeler.com/2026/10/14/why-academics-should-self-publish-textbooks/
1•jruohonen•25m ago•0 comments

Prior-Data Gravity and Framework Reabsorption: A Behavioral Theory of LLMs

https://zenodo.org/records/23431917
1•RhizomaticMind•26m ago•0 comments

Developing for Debugging (2025)

https://www.davepacheco.net/blog/2025/developing-for-debugging-dns-propagation/
2•mpweiher•27m ago•0 comments

Show HN: Vramkit – lossless VRAM compression for LLM inference, on a MacBook

https://github.com/SRKRZ23/vramkit
1•sardor_r1•29m ago•0 comments

Welcome to the tour (AHP tour that is, Association of Hackathon Professionals)

https://ahptour.com/blog/welcome-to-the-tour/
2•andrewfromx•30m ago•0 comments

FDE-Gym: The Last Mile of AI Delivery

https://arxiv.org/abs/2610.22350
1•Betelbuddy•31m ago•0 comments

Ask HN: It's still worth to show own handmaded games to the public internet?

1•Wormaus•32m ago•1 comments

Show HN: High-quality duck audio synthesizer

https://celphase.github.io/duck-pond/
1•celphase•33m ago•0 comments

Sl – A Scalable, User-Friendly Source Control System

https://github.com/facebook/sapling
1•modinfo•39m ago•0 comments

Is there a temp phone number like temp email?

5•blacksinger•43m ago•1 comments