frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Disco – Self-hosted PaaS for teams outgrowing Render and Heroku

https://disco.cloud/
1•tosh•52s ago•0 comments

My Complicated Relationship with Side Projects

https://lopezb.com/articles/my-complicated-relationship-with-side-projects
1•lopezb•3m ago•0 comments

But why is AI bad?

https://daymare.net/blogs/but-why-is-ai-bad/
2•victorbuilds•4m ago•1 comments

Show HN: Elf – A CLI Helper for Advent of Code

https://github.com/cak/elf
2•cak•4m ago•1 comments

Exposure for Designers

https://hvpandya.com/exposure
1•hvpandya•5m ago•1 comments

Systems, Stables and Stars

https://hvpandya.com/systems-stables-stars
1•hvpandya•6m ago•1 comments

Hachiko: The Loyal Dog in Shibuya

https://tokyotreat.com/blog/hachiko-the-loyal-dog-in-shibuya
1•matonias•8m ago•1 comments

CD4T cells acquire Eomesodermin to modulate cellular senescence and aging

https://www.nature.com/articles/s43587-025-00953-8
1•wslh•9m ago•0 comments

Anacondas Have Been the Same Size for over 12 Million Years, Fossils Reveal

https://scienceclock.com/fossils-reveal-anacondas-have-been-the-same-size-for-over-12-million-years/
1•ashishgupta2209•9m ago•0 comments

Another open source project dies of neglect, leaving thousands scrambling

https://www.theregister.com/2025/12/02/ingress_nginx_opinion/
3•defrost•12m ago•0 comments

India orders phone makers to preload devices with state-owned cyber safety app

https://www.theguardian.com/technology/2025/dec/01/india-phone-sanchar-saathi-app-cybersecurity
3•vinni2•13m ago•0 comments

Deformable Object Manipulation

https://twitter.com/yusufma555/status/1995710878621331719
1•gokhan•14m ago•0 comments

Man unexpectedly cured of HIV after stem cell transplant

https://www.newscientist.com/article/2506595-man-unexpectedly-cured-of-hiv-after-stem-cell-transp...
5•doener•19m ago•0 comments

Show HN: I made a yule themed secret Santa system for my family

https://yule.lingon.land/
3•lingonland•19m ago•0 comments

Ukraine developing independent AI system with Google open technology

https://www.reuters.com/business/media-telecom/ukraine-developing-independent-ai-system-with-goog...
4•giuliomagnifico•20m ago•0 comments

I have high levels of forever chemicals in my blood – what can I do about it?

https://www.bbc.com/news/articles/ce8z8pv1e0ko
4•breve•22m ago•0 comments

Complete AD&D 2nd edition compendium

https://www.completecompendium.com/
1•rogermungo•23m ago•0 comments

Show HN: SemVer for Books

https://bookver.org
1•control-h•25m ago•0 comments

Show HN: I built a bulk image generator after seeing a YouTuber's struggle

https://aibulkimagegenerator.com
1•qinggeng•25m ago•0 comments

Implementing Patterns with the Cloudflare Agents SDK

https://coey.dev/agents-patterns
1•acoyfellow•27m ago•0 comments

Show HN: Visual, local-first data tool

https://columns.dev/
2•rafferty97•32m ago•0 comments

Ask HN: Battling Depression

2•server_man3000•32m ago•2 comments

OpenEWS: Open-Source Early Warning System

https://github.com/open-ews/open-ews
1•dwilkie•34m ago•0 comments

From Muck to Mauve: the creation of modern dyes from coal tar

https://keiran-rowell.github.io/dyes/2025-11-05-aniline-and-the-german-chemical-industry/
1•KR_compchem•35m ago•0 comments

IFF's Statement against mandatory installation of "Sanchar Saathi"

https://internetfreedom.in/iffs-statement-against-dots-direction-for-the-mandatory-installation-o...
4•captn3m0•36m ago•1 comments

Somleng SMS Gateway Android App: Twilio-Compatible SMS Made Easy

https://github.com/somleng/sms-gateway-app
2•dwilkie•36m ago•0 comments

Found an Interesting Application on Peerlist

https://peerlist.io/transmonkey/project/vgenie-ai
1•funny_aiadsa•38m ago•0 comments

Trap Street

https://en.wikipedia.org/wiki/Trap_street
1•tosh•40m ago•0 comments

Transcribe Video to Text: Free Video to Text Converter

https://taptranscribe.com/
1•lizbo•44m ago•0 comments

IPCola: A Tangled Mess

https://synthient.com/blog/ipcola-a-tangled-mess
1•benjamindev•45m ago•0 comments