frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

JSON-render: LLM-based JSON-to-UI tool

https://json-render.dev/
2•rickcarlino•1m ago•0 comments

James Cameron says he has left the US permanently

https://www.theguardian.com/film/2026/jan/23/james-cameron-left-the-us-permanently-covid-new-zealand
1•belter•2m ago•0 comments

Thousands of scientists inflate their CVs with self-published studies

https://english.elpais.com/science-tech/2026-01-22/thousands-of-scientists-inflate-their-cvs-with...
2•belter•2m ago•0 comments

Open Policy Agent

https://www.openpolicyagent.org/
1•locknitpicker•3m ago•0 comments

The US Is Losing Top Tech Talent to India in the Wake of Trump's H-1B Chaos

https://www.bloomberg.com/news/articles/2026-01-23/us-loses-top-tech-talent-to-india-in-wake-of-h...
1•alephnerd•4m ago•0 comments

The Concatative Language XY

http://www.nsl.com/k/xy/xy.txt
1•ofalkaed•6m ago•1 comments

Show HN: Viahuman – Human In loop Notification system for LLMs

https://viahuman.xyz/
1•pdrojack•8m ago•0 comments

The Coming Second Copernican Revolution

https://www.noemamag.com/the-coming-second-copernican-revolution/
1•andsoitis•10m ago•0 comments

How WhatsApp Scaled to Billions of Users

https://singhajit.com/whatsapp-scaling-secrets/
2•arter45•10m ago•1 comments

BirdyChat becomes first European chat app that is interoperable with WhatsApp

https://www.birdy.chat/blog/first-to-interoperate-with-whatsapp
2•joooscha•10m ago•0 comments

Freedom of the Will and the Concept of a Person

https://www.jstor.org/stable/2024717
1•andsoitis•11m ago•0 comments

Proxima Kósmos, Vol. II: Fictions and Futures

https://berggruen.org/eu/library/proxima-kosmos-volume-2
2•andsoitis•12m ago•0 comments

Microsoft Systems Journal (2024)

https://jacobfilipp.com/msj-index/
1•elvis70•13m ago•0 comments

Trump vs. Carney at Davos: One summit, two visions

https://www.chathamhouse.org/2026/01/trump-vs-carney-davos-one-summit-two-visions-independent-thi...
3•rbanffy•14m ago•1 comments

How 911 Dispatchers Work [video]

https://www.youtube.com/watch?v=euKUN8hvVao
1•gmays•17m ago•1 comments

Math vs. Writing: difficulty and threshold effects

https://greyenlightenment.com/2026/01/10/math-vs-writing-difficulty-and-threshold-effects/
1•paulpauper•17m ago•0 comments

Gems: Little-Known Bash Features

https://slicker.me/bash/gems.html
1•nateb2022•21m ago•1 comments

Show HN: Loclean – Local semantic data cleaning with LLMs and Pydantic

https://github.com/nxank4/loclean
1•nxank4•21m ago•0 comments

A wallet that never sleeps is probably not human

https://www.HugeDomains.com/domain_profile.cfm?d=Ketaro.com
1•chainbuilder•22m ago•1 comments

The Humble Android Calculator

https://medium.com/@jnebos/the-humble-android-calculator-4f139e8b1699
2•RGBCube•23m ago•1 comments

Heart Rate Variability Dynamics in Padel Players in Relation to Match Outcome

https://www.mdpi.com/2411-5142/11/1/12
1•PaulHoule•26m ago•0 comments

Learning to Discover at Test Time

https://test-time-training.github.io/discover/
1•in-silico•27m ago•0 comments

Managing a million dollar pool with 15k lines of Go

http://nat-echlin.com/one.html
1•natechlin•29m ago•0 comments

Ask HN: How to redeem a Gift Card without risking lock-out?

1•magnetic•29m ago•1 comments

Understanding Rust Closures

https://antoine.vandecreme.net/blog/rust-closures/
2•avandecreme•32m ago•0 comments

Pywidevine: Python Implementation of Google's Widevine DRM CDM (Content Decrypti

https://github.com/devine-dl/pywidevine
1•fanf2•32m ago•0 comments

Is Privacy an Illusion?

1•rafaelmdec•32m ago•1 comments

Namecheap sued a YC founder personally after shutting down her startup's domain

https://twitter.com/snigdhasur/status/2014747997943238791
7•ecares•34m ago•3 comments

Ask HN: Weekend Social: Top two programming languages and what they can borrow?

1•susam•35m ago•2 comments

Get-Shit-Done

https://github.com/glittercowboy/get-shit-done
5•mpartel•35m ago•0 comments