frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

The Ridiculous Engineering of the Most Important Machine: Veritasium [video]

https://www.youtube.com/watch?v=MiUHjLxm3V0
1•b-lee•21s ago•0 comments

Setting up a new PC used to be fun, now it is ad-ridden nightmare

https://www.neowin.net/editorials/setting-up-a-new-pc-used-to-be-fun-now-it-is-ad-ridden-nightmare/
1•bundie•2m ago•0 comments

Why It Matters

https://jukkaniiranen.com/2026/01/why-it-matters/
2•jukkan•2m ago•0 comments

Representing Hierarchies

https://gpfault.net/posts/first-child-next-sibling.html
1•nice_byte•3m ago•0 comments

The year in charts: 2025's biggest tech stories

https://restofworld.org/2025/charts-tech-2025/
1•brandrick•6m ago•0 comments

Show HN: I built a football trivia game using only Vanilla JavaScript and S3

https://www.guessthebadge.com/
1•Sharpsight•6m ago•1 comments

Build ChatGPT Apps with Encore

https://www.bravostudio.app/post/chatgpt-apps-are-here-meet-encore
1•petercod•7m ago•0 comments

Going immutable on macOS, using Nix-Darwin

https://carette.xyz/posts/going_immutable_macos/
2•weird_trousers•10m ago•0 comments

Standard Ebooks: Public Domain Day 2026 in Literature

https://standardebooks.org/blog/public-domain-day-2026
1•WithinReason•12m ago•0 comments

Article: Why Big Tech Turns Everything into a Knife Fight

https://medium.com/@dmitrytrifonov/why-big-tech-turns-everything-into-a-knife-fight-42e221944ec8
1•birdculture•14m ago•0 comments

Show HN: Oshn Prompt – Turn any text into optimized AI prompts (macOS)

https://promt.oshn-ai.com
1•iliailinskii•16m ago•0 comments

The day I became a surgeon, I quit

https://emmabruns.substack.com/p/the-day-i-became-a-surgeon-i-quit
1•emmabruns•23m ago•2 comments

Mutually Intelligible Languages

https://academia-lab.com/encyclopedia/mutually-intelligible-languages
1•thomassmith65•32m ago•0 comments

Nano Banana

https://nanobanana-ai.net/
1•Lorenzalzzo•34m ago•0 comments

Show HN: Foresight – rolling dice with 2025 weak signals

https://2025.kghosh.me/
1•kelu124•36m ago•0 comments

Round the tree, yes, but not round the squirrel

https://www.futilitycloset.com/2026/01/02/round-and-round/
12•beardyw•37m ago•5 comments

The State of Agentic iOS Engineering in 2026

https://medium.com/@dimillian/the-state-of-agentic-ios-engineering-in-2026-c5f0cbaa7b34
1•dimillian•38m ago•0 comments

How macOS has grown 2019-2025

https://eclecticlight.co/2026/01/02/how-macos-has-grown-2019-2025/
3•ingve•40m ago•1 comments

Show HN: Vect AI – Turning AI plans into marketing workflows that run

https://www.google.com/search?q=site%3Ablog.vect.pro&oq=&gs_lcrp=EgZjaHJvbWUqCQgBECMYJxjqAjIJCAAQ...
1•afrafgf•40m ago•0 comments

Why 2025 is about crypto's infrastructure, not market rallies

https://altcoindesk.com/perspectives/expert-opinions/why-2025-is-about-cryptos-infrastructure-not...
1•Chryzano•42m ago•1 comments

Show HN: Cursor Party – An MMO cursor game built in 1 hour with Elixir Phoenix

https://github.com/jidohyun/cursor-party
1•map12345678•45m ago•0 comments

How do you realistically render RAL colors on aluminium window frames?

1•apavlinovic•46m ago•0 comments

How do you realistically render RAL colors on aluminium window frames?

https://protabula.com/en
1•apavlinovic•47m ago•1 comments

Ask HN: How do I help a colleague who introduces a lot of typos?

5•tornadofart•48m ago•4 comments

Chinese Alchemical Elixir Poisoning

https://en.wikipedia.org/wiki/Chinese_alchemical_elixir_poisoning
2•pr337h4m•49m ago•0 comments

Does a canvas-first IDE make sense for real front end work?

https://roopik.com/
1•contactdy14•50m ago•1 comments

Building a company where AI runs operations, not just assists

1•brainz_cto•50m ago•0 comments

Can Apple's AirPod Translation Get You Through Tokyo?

https://www.nytimes.com/2025/12/26/travel/airpods-live-translation-japan.html
1•vquemener•50m ago•0 comments

NASA could be weeks away from its biggest test in decades

https://www.cnn.com/2025/12/31/science/artemis-2-astronauts-moon-mission-overview
1•sipofwater•53m ago•1 comments

Ask HN: In 2026 how would you learn marketing if you were shit at in 2025?

1•sahil423•53m ago•0 comments