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

Moxie Marlinspike: I'd be surprised if LLMs broke RSA

https://twitter.com/moxie/status/2127124315019903338
1•doener•56s ago•0 comments

The US Lock of the Web: Let's Talk about Let's Encrypt

https://ache.one/notes/the-us-lock-of-the-web
1•zdw•57s ago•0 comments

North Korea built the best army of hackers

https://www.cnn.com/2026/11/29/asia/north-korea-hacking-capabilities-intl-hnk-dst
3•devonnull•1m ago•0 comments

DNS Made Easy: Reset Your Password and Generate New API Keys

https://support.dnsmadeeasy.com/hc/en-us/articles/59335708054683-DNS-Made-Easy-Reset-Your-Passwor...
1•Lammy•2m ago•0 comments

Keep It SSA, Stupid

https://fzakaria.com/2026/11/28/keep-it-ssa-stupid
1•ingve•2m ago•0 comments

Datasette-Charts 0.5a0

https://simonwillison.net/2026/Nov/28/datasette-charts/
1•floornext•3m ago•0 comments

Golden Phase OS – a bare-metal OS built on four-phase logic

https://github.com/lightspeedstudio/Golden-Phase-Operating-System
1•GoldenPhaseOS•3m ago•0 comments

In Germany, Hitler lookalike sentenced for glorifying Nazism

https://unn.ua/en/news/in-germany-hitler-lookalike-convicted-of-glorifying-nazism
2•extasetoi12•3m ago•0 comments

Hold'em Heroes

https://holdemheroes.titletown-digital.com
1•atgsus•8m ago•0 comments

If It Floats

https://blog.coredump.cx/p/if-it-floats
2•surprisetalk•10m ago•0 comments

Show HN: Texspace – Planet-scale Rust geocoder in 4-16 GB RAM (SQLite and S2)

https://texspace.dev/
2•nside•11m ago•0 comments

Hard Problem of Consciousness

https://en.wikipedia.org/wiki/Hard_problem_of_consciousness
1•simonebrunozzi•12m ago•0 comments

Museum of Funeral Customs

https://en.wikipedia.org/wiki/Museum_of_Funeral_Customs
2•bookofjoe•13m ago•0 comments

Ozempic indirectly boosts fertility, causing surprise pregnancies

https://health.clevelandclinic.org/ozempic-babies
3•illidan1000•13m ago•0 comments

Windows Server 2028 axes WSUS, BIOS support– OSnews

https://www.osnews.com/story/146461/windows-server-2028-axes-wsus-bios-support-windows-11-loses-i...
2•abdelhousni•13m ago•0 comments

Claude and I Found a Dwarf Planet Candidate

https://www.joshuawolk.com/writing/claude-and-i-found-a-dwarf-planet-candidate
5•nhatcher•16m ago•1 comments

Porting Old Llamasoft Games to iOS

https://blog.gingerbeardman.com/2026/11/29/porting-old-llamasoft-games-to-ios/
2•ingve•18m ago•0 comments

Cyanobacterium can adapt to simulated Martian conditions

https://bioengineer.org/simulated-martian-conditions-reshape-cyanobacterial-growth-and-lipid-meta...
9•hackthemack•19m ago•0 comments

Self-hosted software development factory

https://kudmitry.com/articles/self-hosted-software-development-factory/
4•ingve•19m ago•0 comments

PayPal 2FA no longer working

https://www.reddit.com/r/paypal/comments/1t47swy/paypal_2fa_no_longer_working/
2•martyfunkhouser•19m ago•0 comments

What We Got Wrong About Comas

https://www.theatlantic.com/science/2026/11/coma-consciousness/689574/
2•fortran77•20m ago•0 comments

Increased Capacity Amplifies Direction

https://oak.ninja/blog/2026/11/29/increased-capacity-amplifies-direction.html
7•OakNinja•23m ago•0 comments

Post-Quantum Encryption Adoption

https://radar.cloudflare.com/post-quantum
2•mfiguiere•24m ago•0 comments

Corey Quinn – AWS Keynote: If I Were Starting over [video]

https://www.youtube.com/watch?v=3sPj-J6pjZo
2•zdw•24m ago•0 comments

Amazon Price Alert and Auto Buy: GTC Order for Shopping

https://thefinancebuff.com/amazon-price-alert-auto-buy.html
1•hnburnsy•28m ago•0 comments

"No-one was close to solving The Riemann Hypothesis"

https://www.youtube.com/watch?v=FMJrEzK1wz4
1•Betelbuddy•37m ago•0 comments

SpaceX denies report Iran used Starlink against U.S. forces, demands retraction

https://www.cnbc.com/2026/11/29/elon-musk-spacex-starlink-iran-us-military.html
5•Betelbuddy•38m ago•3 comments

State of the tech job market: late 2026

https://www.lennysnewsletter.com/p/state-of-the-tech-job-market-late
1•xqcgrek2•41m ago•0 comments

Show HN: A 300k-line Zig desktop environment with its own compositor,GUI toolkit

https://github.com/oxydizer/rediwm
3•oxydizer•43m ago•0 comments

Cryptographers form review group over encryption discoveries

https://cyberscoop.com/cryptography-incident-review-group-ai-encryption-rumors/
1•srameshc•46m ago•0 comments