frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Text Files as a User Interface

https://ratfactor.com/cards/text-files-as-ui
1•ibobev•28s ago•0 comments

Superkabe vs. Smartlead

1•Richardsonsimon•41s ago•0 comments

AI, Tractors, and the Productivity Paradox

https://read.technically.dev/p/the-ai-productivity-paradox
1•gurjeet•56s ago•0 comments

PushWard – Hosted APNs gateway for iOS Live Activities, with open-source bridges

https://pushward.app
1•devseccarry•2m ago•0 comments

The Next Generation of Eventide – shaped by a decade of event sourcing

https://blog.eventide-project.org/articles/the-next-generation-of-eventide/
1•sbellware•3m ago•1 comments

Mojo Release v1.0.0b1

https://mojolang.org/releases/v1.0.0b1/
1•visheshdembla•3m ago•0 comments

Brazil's Pix Payment System Faces Pressure from Visa and Mastercard

https://www.elciudadano.com/en/brazils-pix-payment-system-faces-pressure-from-visa-and-mastercard...
2•wslh•4m ago•0 comments

After AI, Coordination

https://faingezicht.com/articles/2026/05/04/after-ai-coordination/
1•mooreds•6m ago•0 comments

Designers Are Having Fun. Again

https://metedata.substack.com/p/010-designers-are-having-fun-again
1•young_mete•6m ago•0 comments

Infisical Honey Tokens

https://infisical.com/blog/infisical-honey-tokens
2•vmatsiiako•6m ago•0 comments

Principles for agent-native CLIs

https://twitter.com/trevin/status/2051316002730991795
2•blumpy22•7m ago•0 comments

Wind and solar have saved UK from gas imports worth £1.7B since Iran war began

https://www.carbonbrief.org/analysis-wind-and-solar-have-saved-uk-from-gas-imports-worth-1-7bn-si...
3•DamonHD•8m ago•0 comments

Anthropic working on Orbit, its upcoming proactive assistant

https://www.testingcatalog.com/anthropic-is-working-on-orbit-its-upcoming-proactive-assistant/
1•gmays•8m ago•0 comments

Show HN: Bookstoread.ai – Discover non-fiction books using AI

https://bookstoread.ai
1•yotc•8m ago•0 comments

Subquadratic LLM 12 million tokens ctx [video]

https://www.youtube.com/watch?v=kEiuMnosuxU
1•mrkn1•8m ago•0 comments

Publish to Microsoft Store as a company now free

https://blogs.windows.com/windowsdeveloper/2026/05/07/publish-to-microsoft-store-as-a-company-now...
1•pentagrama•9m ago•0 comments

A Message from Unemployment Purgatory

https://inchwyrm.bearblog.dev/message-from-unemployment-purgatory/
1•speckx•9m ago•0 comments

Neal Katyal: "Harvey predicted many of the questions the Justices asked"

https://twitter.com/neal_katyal/status/2052133764940382262
1•asukumar•9m ago•0 comments

Coalton

https://coalton-lang.github.io/
2•tosh•10m ago•0 comments

Show HN: Dear ImGui Bundle: Python and C++ apps for desktop, mobile, and the web

https://github.com/pthom/imgui_bundle
1•pstomi•10m ago•0 comments

Plastic Flowers to Protect the Hive

https://phildini.dev/slopsquatting-for-good
1•phildini•11m ago•0 comments

Show HN: BookedKit, a booking-ready EPK builder for musicians and DJs

https://www.bookedkit.com
1•bookedkit•11m ago•0 comments

Turing Award Winner: Disagreeing with Google, Postgres, Future Problems [video]

https://www.youtube.com/watch?v=YPObBOwIrHk
1•ferryth•12m ago•1 comments

Why Talent Transformation Is the Missing Focus of Enterprise AI

https://www.databricks.com/blog/why-talent-transformation-missing-focus-enterprise-ai
1•mc-serious•12m ago•0 comments

Two player Tetris for VT-100 terminals on vintage Unix [video]

https://www.youtube.com/watch?v=vDSmPMDjP08
1•GaryBluto•15m ago•0 comments

LPython: High performance typed Python compiler

https://lpython.org/
1•tosh•16m ago•0 comments

Can Intrusion Detection for EV Powertrain Networks

https://www.mdpi.com/2079-9292/15/9/1788
1•PaulHoule•16m ago•0 comments

NYC's Multibillion-Dollar Black Box Contracts

https://nysfocus.com/2026/05/06/new-york-city-contracting-master-agreements
1•h2si•17m ago•0 comments

Quantizing Tangent Frames

https://zeux.io/2026/04/30/quantizing-tangent-frames/
1•ibobev•17m ago•0 comments

Testing Vue Components in the Browser

https://jvns.ca/blog/2026/05/02/testing-vue-components-in-the-browser/
2•ibobev•19m ago•0 comments