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

Tech support scam caused data breach at Australian airline Qantas

https://www.theregister.com/cyber-crime/2026/07/16/tech-support-scam-caused-massive-data-breach-a...
1•sbulaev•38s ago•0 comments

Show HN: Cybara – An open-source AI agent platform built with Bun

https://github.com/metaspartan/cybara
1•carsenk•3m ago•0 comments

I resurrected an 8-year-old dead CSS library and gave it an engine

https://usevivace.dev
1•axelrevana•3m ago•0 comments

Show HN: Effort Lab – Same running pace, different heart rate zones

https://www.motraapp.com/effort-lab
1•timmonty•4m ago•0 comments

Copyright law is now the biggest battleground in Australia's AI boom

https://www.abc.net.au/news/2026-07-14/copyright-law-battleground-in-australia-ai-boom/106891890
1•technewssss•5m ago•0 comments

Why heat pumps are still so hot in the US

https://www.technologyreview.com/2026/07/16/1140505/heat-pump-sales-us/
1•joozio•6m ago•0 comments

OpenBSD/loongson hardware platform retired

https://www.undeadly.org/cgi?action=article;sid=20260716110034
2•peter_hansteen•6m ago•0 comments

Looking Up as a Serious Discipline

https://idle.news/blog/the-committee-on-clouds/
1•umilio•9m ago•0 comments

eBay payout isn't your profit

https://k-id.app/blog/your-payout-is-not-your-profit/
1•tinosar•9m ago•0 comments

Visualize Your Chrome Bookmarks as Smart Sticky Notes

https://chromewebstore.google.com/detail/sticky-note-web-clipper-s/gniilbpapgommpalikcclpcnbcamgila
1•taskloco_nyc•9m ago•0 comments

Scenecast – a logo and clips in, a finished branded video out

https://github.com/roomcareOS/scenecast
1•roomcare•11m ago•0 comments

Wildcards in CSS

https://remysharp.com/2026/07/11/wildcards-in-css
1•meetpateltech•11m ago•0 comments

Why so many updating in LLM so-called SOTA let remind of iPhone 4-x

https://medium.com/airbnb-engineering/from-weeks-to-a-day-how-we-made-llm-evaluation-fast-enough-...
1•qiuwu•13m ago•1 comments

Global Nobel Laureates Assembly on AI and Nuclear War: Recap, Quotes, and Video

https://www.domuscommunis.org/events/nobel-laureates-assembly/
2•dn2k•14m ago•0 comments

I resurrected my web usability checklist from 2013

https://www.userium.com/
1•userium•15m ago•0 comments

Abstracting Effects with Continuations

https://crowdhailer.me/2026-07-15/abstracting-effects-with-continuations/
1•whwhyb•15m ago•0 comments

Track your workout from the iPhone Lock Screen

https://musklr.com/blog/2026/iphone-lock-screen-workout-tracking-live-activity/
1•badgag•17m ago•0 comments

Crates.io front-end and its issue(s)

https://blog.guillaume-gomez.fr/articles/2026-07-13+crates.io+front-end+and+its+issue(s)
1•ncts•19m ago•0 comments

Computer Online Forensic Evidence Extractor

https://en.wikipedia.org/wiki/Computer_Online_Forensic_Evidence_Extractor
1•grubbs•19m ago•0 comments

Enrolling in the Third-Party App Store on Play Program

https://support.google.com/googleplay/android-developer/answer/17118006?hl=en
1•HelloUsername•21m ago•1 comments

Wicked Features

https://www.seangoedecke.com/wicked-features/
1•andai•21m ago•0 comments

Supertasks: Doing Infinitely Many Things–Lectures on Infinity (Lecture 2)

https://www.youtube.com/watch?v=h02divcjYcc
1•FillMaths•21m ago•0 comments

The Language of Thought Is Not Natural Language

https://www.biorxiv.org/content/10.1101/2025.07.26.666979v3
2•Anon84•22m ago•0 comments

A Guide to Agile for English Speakers

https://lewiscampbell.tech/blog/260713.html
2•LAC-Tech•26m ago•0 comments

Show HN: My triathlon coach (not a human) now texts me on iMessage

https://www.athletedata.health
2•daniel_s•28m ago•0 comments

Free Gantt Chart Maker

https://ganttchartmaker.app/
1•fotispetrou•29m ago•0 comments

Ente – Opening Our Books

https://ente.com/open/
4•Sherex•30m ago•0 comments

Show HN: Skillful, stop maintaining the same AI workflow in five places

https://skillful.md/
1•mastermindzh•31m ago•0 comments

Deleting Systems You Don't Understand

https://idiallo.com/blog/deleting-systems-you-dont-understand
1•blenderob•37m ago•0 comments

AI Knows What You Did Online. Now Your Employer Does, Too

https://www.wsj.com/lifestyle/careers/ai-knows-what-you-did-online-now-your-employer-does-too-497...
4•cebert•43m ago•1 comments