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

FK Sofa – Truck

https://www.truck-furniture.co.jp/en/backstories/fk-sofa/
2•Michelangelo11•9m ago•1 comments

Faststrap: Component-based FastHTML extension that provides reusable UI elements

https://github.com/Faststrap-org/Faststrap
1•indigodaddy•10m ago•0 comments

Power of Raycast, Now on iOS

https://www.raycast.com/ios
2•rene_d•28m ago•0 comments

Punchy – a security Tamagotchi that boxes the internet

https://punchy.virtualserv.uk
1•raister•37m ago•0 comments

What if your ChatGPT conversations have a dashboard that can track things

https://chatgpt.com/plugins/plugin_asdk_app_6ad58e43cfe881919841205d69cff9cf
2•vasanthps•38m ago•0 comments

Good writing is a business advantage (2020)

http://adaged.blogspot.com/2020/04/good-writing-is-business-advantage.html
1•zenincognito•47m ago•0 comments

Non-autoregressive NC LLM spits tokens 21x faster than text diffusion

https://hazyresearch.stanford.edu/blog/2026-10-12-ncm
1•LarsDu88•47m ago•0 comments

Junglia theme park in Okinawa posted ¥17.3B (US$109.84) loss in first year

https://www.japantimes.co.jp/business/2026/09/26/junglia-okinawa-first-year-loss/
1•guessmyname•50m ago•0 comments

Farewell – ETAOIN SHRDLU – 1978 [video]

https://vimeo.com/127605643
1•apical_dendrite•51m ago•0 comments

Ask HN: Is the Microsoft buyout just a long overdue correction?

2•sky2224•55m ago•2 comments

Push Ifs Up and Fors Down

https://matklad.github.io/2023/11/15/push-ifs-up-and-fors-down.html
2•dboon•56m ago•0 comments

From the Analytics Department to a Lone Operator with a Laptop

https://medium.com/@smoking2man/from-the-analytics-department-to-a-lone-operator-with-a-laptop-ho...
1•Aldus551•57m ago•0 comments

Digital Minimalism

https://vitalik.eth.limo/general/2026/10/31/digital_minimalism.html
3•wilbertliu•1h ago•0 comments

Mexico urges respect for treaties after Texas seizes nine islands on Rio Grande

https://english.elpais.com/usa/2026-10-30/mexico-urges-respect-for-treaties-after-texas-seizes-ni...
1•geox•1h ago•0 comments

Ask HN: Is anyone else struggling with AI wealth FOMO?

2•kadhirvelm•1h ago•1 comments

Automated Subtle Emergent Misalignment Research

https://alignment.anthropic.com/2026/automated-em-search/
1•pretext•1h ago•0 comments

UTF-34 BASE-4: Codespace 4^34 = 2^68, Zero-Waste Theorem, and 1M Binary Codes

https://media.githubusercontent.com/media/anhkhoavanhua/utf34/refs/heads/main/utf34_base4_1M_bina...
1•jackhua18112001•1h ago•0 comments

Cold showers benefit the environment and your health

https://www.unibas.ch/en/News-Events/News/Uni-Research/cold-showers-health-environment.html
4•DeepLogin•1h ago•1 comments

Tier 1 ISPs react to unfair pricing

https://www.datacenterknowledge.com/networking/cogent-unplugs-telia-in-peering-dispute
1•countWSS•1h ago•1 comments

Google Adopts New AI Training Control

https://www.seroundtable.com/google-ai-training-control-42430.html
1•thm•1h ago•1 comments

Spanish minister refuses to resign over second major train crash on his watch

https://www.channelnewsasia.com/world/spain-transport-minister-resign-train-crash-6507826
2•Markoff•1h ago•2 comments

Language Models Need Sleep: Learning to Self-Modify and Consolidate Memories

https://arxiv.org/abs/2606.03979
4•olalonde•1h ago•0 comments

Tell HN: Claude is using my limits even though it's infra is failing

4•throwaw12•1h ago•4 comments

How hard is it to check for whitespace?

https://serce.me/posts/2026-10-30-how-hard-is-it-to-check-for-whitespace
2•SerCe•1h ago•0 comments

Alkaline batteries are obsolete – but not for the reason you'd think [video]

https://www.youtube.com/watch?v=I1rlK3BKmyA
3•no-name-here•1h ago•0 comments

Show HN: Archwhere – work alongside AI coding agents on an architecture map

https://github.com/tapaskar/archwhere
1•sparkupcloud•1h ago•0 comments

Cloudflare Build

https://build.cloudflare.dev
2•tomrod•1h ago•1 comments

Apple Is Entering Its Slop Era

https://www.404media.co/apple-is-entering-its-slop-era/
1•Garbage•1h ago•0 comments

Cursed cruise: how the dream of never-ending luxury at sea became a nightmare

https://www.theguardian.com/news/ng-interactive/2026/oct/31/mv-odyssey-cruise-passengers-nightmar...
9•mellosouls•1h ago•1 comments

Show HN: Ramekin – IoT development, deployment and update platform via Apptainer

https://github.com/ascension-association/ramekin
1•mrbluecoat•1h ago•0 comments