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

The 101 Plays Itself

https://the-101-plays-itself.netlify.app/?cam=cam619&auto=1#theremin,glass
1•bookofjoe•4m ago•0 comments

Using Modal for GLM Flash on Cadenya's Agent Runtime

https://www.cadenya.com/handwritten/using-glm-on-cadenya
1•btables•7m ago•0 comments

Language Preservation Efforts Get an AI Boost

https://home.dartmouth.edu/news/2025/04/language-preservations-efforts-get-ai-boost
1•Anon84•9m ago•0 comments

GCC 13.5 released with 265 bug fixes

https://www.phoronix.com/news/GCC-13.5-Released
1•birdculture•10m ago•0 comments

NüshuRescue: Reviving the Endangered Nüshu Language with AI

https://aclanthology.org/2025.coling-main.468/
1•Anon84•10m ago•0 comments

Post-Quantum Cryptography for Healthcare Professionals

https://www.udemy.com/share/10fqoh3@qAKj788D2e8npaulRCz7YTIJ4kKMbU2IHFiz-tFx_LInz3MckD-gWTt_F0HhJ...
1•remopulcini•14m ago•0 comments

She couldn't afford retirement in the US, so she relocated to Portugal

https://www.cnn.com/travel/retirement-relocation-california-to-porto-portugal
2•mooreds•14m ago•0 comments

Show HN: Srvquery, a TypeScript toolkit for querying game servers

https://github.com/carlos-menezes/srvquery
1•carlos-menezes•19m ago•0 comments

As antibiotic resistance grows, researchers turn to copper to fight infections

https://phys.org/news/2026-09-antibiotic-resistance-copper-infections.html
2•mdp2021•20m ago•0 comments

Bioluminescence and Living Earth

https://worldsensorium.com/bioluminescence-and-living-earth/
1•dnetesn•20m ago•0 comments

When Flowers Keep Time

https://worldsensorium.com/when-flowers-keep-time-how-circadian-rhythms-shape-the-world-of-scent/
2•dnetesn•23m ago•0 comments

Shared browser synth room for 8 players Normal By Proxy

https://normalbyproxy.com/
1•bigOrj•24m ago•0 comments

The Examined Life in the Age of Optimisation

https://journal.nyphilosophy.org/p/the-examined-life-in-the-age-of-optimisation
1•mistersquid•26m ago•0 comments

Intel Linux NPU Driver Only Now Officially Supports Ubuntu 26.04 LTS

https://www.phoronix.com/news/Intel-Linux-NPU-Driver-1.38
2•mdp2021•27m ago•0 comments

Google Play Appeal Checker

https://submitsafe.app/appeal-checker
1•igrik•29m ago•0 comments

America's air monitors are disappearing

https://thelensnola.org/2026/09/10/americas-air-monitors-are-disappearing-along-with-the-power-to...
1•geox•32m ago•0 comments

Reasons to be pessimistic (and optimistic) on the future of biosecurity

https://www.owlposting.com/p/reasons-to-be-pessimistic-and-optimistic
2•Bluestein•34m ago•0 comments

368 of the top 2,771 sites block at least one AI search crawler

https://ai-visibility.lastminutedealshq.com/sites-blocking-ai-search
2•reesecalder•36m ago•0 comments

Prototype graph-based social media

https://neui-connect.vercel.app?_vercel_share=f3VnOd8GCZwFxssgRBoj9FUXqHwg8hBC
1•Evanescia•37m ago•0 comments

O'Charley's

https://en.wikipedia.org/wiki/O%27Charley%27s
1•Bluestein•38m ago•0 comments

Apple, Please Open Up iOS

https://swapnilchauhan.com/blog/apple-please-open-up-ios/
1•swapxstar•39m ago•2 comments

Show HN: Xivizley – Visual Docker Compose and Homelab Architect

https://xivizley.com.tr
1•Xivizley•39m ago•0 comments

Reaction: "A Quick Look at Atomics in C"

https://informationalwayswin.blogspot.com/2026/09/reaction-quick-look-at-atomics-in-c.html
1•odilelof•44m ago•0 comments

Show HN: Liniora – Ever thought about replacing your project manager?

https://liniora.com
5•omarammura•47m ago•2 comments

"The CUDA Moat is Gone" – TechTechPotato with AI& founder David Bennet [video]

https://www.youtube.com/watch?v=TiRxcPQNcBA
3•olvy0•47m ago•0 comments

Experiment: How easy is it to buy a research paper on the black market?

https://news.err.ee/1610129869/experiment-how-easy-is-it-to-buy-a-research-paper-on-the-black-market
4•jruohonen•48m ago•0 comments

OpenRGB 1.0 Released

https://openrgb.org/
2•MattTheRealOne•51m ago•0 comments

Show HN: Rust-split – save your tokens on large Rust source files

4•owebeeone•52m ago•1 comments

Build with Replit Against Managed Postgres in Databricks Apps

https://docs.replit.com/updates/2026/09/11/changelog
1•utiiiD•52m ago•0 comments

Journal Editors: How are you evaluating AI assisted papers?

https://mathoverflow.net/questions/515144/journal-editors-how-are-you-evaluating-ai-assisted-papers
1•jjgreen•55m ago•0 comments