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

Survey: Norwegian skepticism toward the US reaches record high

https://www.aftenposten.no/verden/i/oEVKrB/nye-tall-viser-nordmenn-har-mistet-tilliten-til-usa
1•roschdal•2m ago•0 comments

Mozilla revokes Firefox signing key after unencrypted copy lands in GitHub

https://www.theregister.com/security/2026/08/11/mozilla-revokes-firefox-signing-key-after-unencry...
1•GaryBluto•4m ago•0 comments

llama.cpp

https://llama.app
1•kristianpaul•7m ago•0 comments

Wonderful Background Noise Website, Free/Ad-Free (2019)

https://noises.online
1•miek•8m ago•1 comments

A Look at the Milky Mist IPO

https://finshots.in/archive/a-look-at-the-milky-mist-ipo/
1•vismit2000•8m ago•0 comments

Can blockchain save London's gold trade?

https://finshots.in/archive/blockchain-save-londons-gold-trade-2/
1•vismit2000•9m ago•1 comments

85% of personal care products contain unlabeled suspected hazardous chemicals

https://medicalxpress.com/news/2026-08-everyday-personal-products-unlabeled-chemicals.html
1•WaitWaitWha•9m ago•0 comments

Powered by mushrooms, living computers are on the rise (2025)

https://engineering.osu.edu/news/2025/11/powered-mushrooms-living-computers-are-rise
2•GaryBluto•15m ago•0 comments

Open Science Framework Shutting down, Use ResearchBox Instead

https://datacolada.org/137
1•anitil•15m ago•1 comments

StoreCraft – Multipurpose WooCommerce Theme

1•hudawp•18m ago•0 comments

Magic: The Gathering Movie Adaptation Development Update

https://www.themovieblog.com/2026/08/magic-the-gathering-movie-adaptation-receives-development-up...
1•Gaishan•21m ago•0 comments

OllaLink: A Simpler Approach to Remote Access

1•rasal•22m ago•0 comments

Ask HN: How do you use LLMs for your research?

1•bbangjo•22m ago•0 comments

3B1B Virtual Career Fair

https://www.3blue1brown.com/talent/
1•E-Reverance•23m ago•1 comments

Live HN Project Show and Tell on "Fediverse" – Happening NYOW

1•dv35z•24m ago•0 comments

Why Software Factories Fail

https://twitter.com/dexhorthy/status/2080697380379427275
1•narayanahari•27m ago•0 comments

Dropbox, loved by the masses, a shareholder dead end

https://s-1.vercel.app/posts/why-dropbox-is-a-obvious-pe-target/
1•Taikhoom10•28m ago•0 comments

Thumbs Down for Clojure (2009)

https://www.loper-os.org/?p=42
3•LAC-Tech•36m ago•0 comments

OpenAI releases ChatGPT/Codex desktop app for Linux

https://thenewstack.io/openais-chatgpt-desktop-linux/
1•ilamont•37m ago•0 comments

Weaponized: Washington Farmer Targeted After Criticizing Government Regulations?

https://www.agweb.com/news/business/farmland/weaponized-washington-farmer-targeted-after-criticiz...
2•silexia•37m ago•0 comments

Show HN: Dev-loop – parallel coding agents, supervised not just spawned

https://github.com/choiyounggi/dev-loop
1•dch0202•37m ago•0 comments

Geometric Reasoning

https://sophontic.ai/
2•6510•39m ago•1 comments

Winemaking Home Page (2018)

https://web.archive.org/web/20200602092516/http://winemaking.jackkeller.net/index.asp
2•Ariarule•40m ago•0 comments

Honey Gets Terminated as Lawsuits Proceed [video]

https://www.youtube.com/watch?v=EXDemfGNGz0
2•nomilk•51m ago•0 comments

Death March (Project Management)

https://en.wikipedia.org/wiki/Death_march_(project_management)
3•Austin_Conlon•1h ago•0 comments

Apache Fory JSON: JSON Serialization for Java, 10x faster than Jackson

https://fory.apache.org/blog/fory_json_fastest_java_json_framework/
1•theanonymousone•1h ago•0 comments

YouTube sets Made For Kids flag on inappropriate video,won't let owner change it

https://twitter.com/nihaho13/status/2087317049278075130
1•Nition•1h ago•1 comments

The poverty of anti-tech thought

https://www.noahpinion.blog/p/the-poverty-of-anti-tech-thought
3•Ariarule•1h ago•1 comments

Show HN: Lethe is a portable identity layer – user consented

https://lethe-ai.vercel.app
1•NamanaManohar•1h ago•0 comments

Mark Zuckerberg: The Future Is for Everyone

https://about.fb.com/news/2026/08/the-future-is-for-everyone/
3•nedruod•1h ago•1 comments