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

Pet Slime: A Slime Terrarium

https://www.zeldas.page/slime
1•zeldahessler•2m ago•0 comments

Custom FreeBSD Ucarp Setup

https://vermaden.wordpress.com/2026/08/15/custom-freebsd-ucarp-setup/
1•vermaden•3m ago•0 comments

Ask HN: Which blogs and RSS feeds do you follow?

1•nicbou•3m ago•0 comments

Alibaba AI Models Hit 3B Downloads, Passing Meta, Google

https://www.bloomberg.com/news/articles/2026-08-15/alibaba-ai-models-hit-3-billion-downloads-pass...
2•geox•5m ago•0 comments

The Art of Chip-8

https://beyondloom.com/blog/artofchip8.html
1•birdculture•7m ago•0 comments

Show HN: RemindLink – reminders for bookmarks you forgot to revisit

https://remindlink.app/
1•rshshetty•12m ago•0 comments

Show HN: Open-source, lightweight (300KB+) web and YouTube translator

https://chromewebstore.google.com/detail/mira-translator/hmmllfdmkbmmfffjekhmmbhhfhhnocmn
1•DavidBai•12m ago•0 comments

Show HN: Publish directly to handwritten.blog from your reMarkable

https://handwritten.blog/remarkable
1•emilesilvis•13m ago•0 comments

BanProof AI

https://banproof.io/
1•Pratham3690•15m ago•0 comments

Gitizens - A Git-native civilization loop

https://github.com/ordinary9843/gitizens
1•frozenseven•15m ago•0 comments

Free LLM API – every free model behind one key

https://freellmapi.co/
3•ankitg12•18m ago•0 comments

We made electricity from water – and it's easy [video]

https://www.youtube.com/watch?v=v7hmzvGE9dA
2•ot•21m ago•0 comments

Alternative to Internet Archive

3•earworms•28m ago•0 comments

Debian has begun voting on the future of AI/LLM contributions

https://lists.debian.org/debian-devel-announce/2026/08/msg00002.html
3•matheusmoreira•31m ago•0 comments

The Ad Tech Industry Is a Mess, and DecryptAds Aims to Do Something About It

https://decryptads.com/blog/posts/ad-tech-transparency-launch.html
2•classified•40m ago•0 comments

Who's Tracking You? Use DecryptAds to Find Out

https://krebsonsecurity.com/2026/08/whos-tracking-you-use-this-new-service-to-find-out/
2•classified•41m ago•0 comments

Finding a time for a group meeting shouldn't require 20 messages

https://syncerapp.vercel.app/
2•leo_proger•41m ago•0 comments

Buying a single character domain – and 3 character FQDN – for £15

https://shkspr.mobi/blog/2020/08/buying-a-single-character-domain-and-3-character-fqdn-for-15/
4•n_plus_1_acc•45m ago•0 comments

Wayland, Pipewire, Open Source Slowly Closing?

3•earworms•46m ago•0 comments

For the love of god, stop using CPU limits on Kubernetes

https://home.robusta.dev/blog/stop-using-cpu-limits
2•inigyou•47m ago•0 comments

External Index Over Parquet for Fast Point Queries

https://engineering.atspotify.com/2026/7/indexing-the-data-lake-for-online-point-queries
1•djdillon•52m ago•0 comments

It's the SUV tyranny: where have all the normal family cars gone?

https://www.theguardian.com/commentisfree/2026/aug/15/suv-normal-family-cars-roads-supersized-con...
1•mellosouls•56m ago•0 comments

Show HN: AI First Virtual Linux Desktop as a Mac App

https://aifcc.franzai.com/
1•franze•57m ago•0 comments

Listen to my free techno songs you freeloading tech hobo's

https://soundcloud.com/user-111956257
2•minimaxa•1h ago•1 comments

Jobs to Be Done

https://stratnotes.substack.com/p/jobs-to-be-done
3•swastikanayak•1h ago•0 comments

N8N in Production: Lead Qualification That Works

https://trpevski.com/blog/n8n-in-production-lead-qualification-that-works/
1•dzugumot•1h ago•0 comments

Computing Graph Dominators

https://neugierig.org/software/blog/2026/08/dominators.html
1•fanf2•1h ago•0 comments

Show HN: UltimateXO – Open-Source Ultimate Tic-Tac-Toe Web Game

https://ultimatexo.com/
2•mekky16•1h ago•0 comments

People with Stronger Psychopathic Traits Carry Certain Gut Bacteria

https://www.rathbiotaclan.com/study-reveals-microbes-in-your-gut-and-mouth-may-track-psychopathic...
1•Akasci•1h ago•0 comments

Secondhand UK and Irish booksellers suspect AI firms behind strange bulk orders

https://www.theguardian.com/technology/2026/aug/15/uk-ireland-booksellers-suspect-ai-companies-bu...
2•mellosouls•1h ago•0 comments