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

Dobium: $0 commission prediction exchange

https://dobium.com/waitlist
1•nrb23•4m ago•1 comments

The World as a Hologram

https://arxiv.org/html/hep-th/9409089v2
1•qnleigh•8m ago•1 comments

The millionth.bid: the last bidder's quest

https://millionth.bid/
1•bdthombre•8m ago•0 comments

US lawmakers aim to keep China's tech out of sensitive government systems

https://www.rnz.co.nz/news/world/1591943/us-lawmakers-aim-to-keep-china-s-tech-out-of-sensitive-g...
3•billybuckwheat•9m ago•0 comments

Planetary Gear (Code Art)

https://code.chuanqisun.com/planetary-gear/
2•low_tech_punk•9m ago•0 comments

Show HN: Jevlang. delegate every if/while to Jev

https://github.com/RoyWiggins/jevlang
1•roywiggins•29m ago•0 comments

Cognition Crosses $1B in Annualized Revenue Run Rate

https://cognition.com/blog/1b-run-rate
1•doppp•31m ago•0 comments

Distributed Quantum Compiler (DQC / XDQC) by MemQ open-source now

https://www.hpcwire.com/off-the-wire/memq-releases-open-sourced-distributed-quantum-compiler/
1•noobplus•32m ago•0 comments

Great News from Saturn's Moon Enceladus in the Search for Life in Space

https://www.fu-berlin.de/en/presse/informationen/fup/2026/fup_26_116-enceladus-cassini-mikroben-s...
2•geox•32m ago•1 comments

Make an animated pelican on unicycle jugging fish while explaining bash command

https://twitter.com/goodside/status/2103149526244618682
1•forgingahead•33m ago•1 comments

Lecture: Blowup for the Euler Equations with Smooth Forcing – Tristan Buckmaster [video]

https://www.youtube.com/watch?v=tn45ZOp3lXM
1•yurimo•37m ago•1 comments

Ask HN: Is multi-model redundancy now a compliance requirement for small teams?

1•weiqi554177834•43m ago•1 comments

Show HN: A dashboard for tracking usage limits across Claude, Codex, and Cursor

https://www.usagebuddy.com/
2•bhavyshekhaliya•44m ago•1 comments

Walgit: A Git server that is one binary in front of an object store

https://github.com/rgodha24/walgithub
1•handfuloflight•45m ago•1 comments

Show HN: CoordMap – free browser tools for coordinates, elevation, and distance

https://www.coordmap.com/
1•luoluoecho•49m ago•0 comments

Trading a Cloud Identity for Your Own: Workload Attestation on Managed Compute

https://netflixtechblog.com/trading-a-cloud-identity-for-your-own-workload-attestation-on-managed...
2•mfrw•55m ago•0 comments

Were 1970s Korean Orphanages a Great Place to Raise Kids?

https://www.richardhanania.com/p/were-1970s-korean-orphanages-a-great
2•barry-cotter•1h ago•1 comments

A thesis isn't enough for a PhD

https://lemire.me/blog/2026/09/26/a-thesis-isnt-enough-for-a-phd/
2•smilelamp•1h ago•0 comments

Revelations of dozens more platforms hit by OpenAI agents

https://www.abc.net.au/news/2026-09-26/openai-review-rogue-agents-australia-medicare-hack/107199074
4•soundworlds•1h ago•1 comments

The Universe Rendered in ASCII

https://gcdatlas.vercel.app/
1•chaosmachine•1h ago•1 comments

We're gonna need a lot more mathematicians

https://terrytao.wordpress.com/2026/09/24/were-gonna-need-a-lot-more-mathematicians/
8•srcreigh•1h ago•0 comments

Show HN: Safe-fetch – a Python URL fetcher with per-redirect address checks

https://github.com/Rehanfaisal/ssrf-safe-fetch
1•rehandevv•1h ago•0 comments

Eremina Desertorum

https://en.wikipedia.org/wiki/Eremina_desertorum
1•thunderbong•1h ago•0 comments

Lix: Version control system for files and tables

https://lix.dev
2•handfuloflight•1h ago•1 comments

Guitar amp and effects pedal built on the Waveshare ESP32-S3-Touch-AMOLED-2.06

https://github.com/dashersw/coyopedal
1•arbayi•1h ago•0 comments

ShinyHunters Renewed Mass Exploitation Campaign Targeting Oracle PeopleSoft

https://cloud.google.com/blog/topics/threat-intelligence/shinyhunters-renewed-mass-exploitation-c...
3•882542F3884314B•1h ago•0 comments

Faster Transport on Cloud Infra

https://quasiben.github.io/blog/efa-aws/
3•quasiben•1h ago•0 comments

Yamtam.nyc – yet another mass-transit all-in-one map

https://yamtam.nyc
2•tolidano•1h ago•3 comments

Deep Scattering Layer

https://en.wikipedia.org/wiki/Deep_scattering_layer
1•gradus_ad•1h ago•0 comments

Velum: CosyVoice in a Single Binary for Deployment

https://github.com/hardenedlinux/velum
1•nalaginrut•1h ago•0 comments