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

The last week of cryptography announcements

https://twitter.com/VitalikButerin/status/2128284044098220408
1•tosh•1m ago•0 comments

The Proof That Shook Mathematics: AI Proof of the Riemann Hypothesis

https://spectrum.ieee.org/riemann-ai-proof
1•ersinesen•1m ago•0 comments

Superintelligence Questions

https://mccormick.cx/news/entries/superintelligence-questions
1•chr15m•1m ago•0 comments

The Pull Request Is Dead

https://twitter.com/moritzplassnig/status/2125382246492406181
1•tosh•3m ago•0 comments

Show HN: Asak – cross-platform audio recording/playback CLI tool written in Rust

https://github.com/chaosprint/asak
1•chaosprint•4m ago•0 comments

'Artificial retina' in trials seeks to help those with impaired vision

https://www.asahi.com/ajw/articles/16963168
1•BaudouinVH•6m ago•0 comments

AurionMail: E2EE suite (CryptPad/Stalwart) with single-password UX

https://aurion-mail.github.io/docs/
4•remiiiii•7m ago•1 comments

Forced Colour Testing

https://www.24a11y.com/2026/forced-colour-testing/
1•robin_reala•8m ago•0 comments

IBM Quantum Computing: The year of advantage and what comes next

https://www.ibm.com/quantum/blog/qdc-2026
2•thinkingemote•10m ago•0 comments

RTK 1.3 – Rust CLI proxy that cuts LLM token usage

https://github.com/rtk-ai/rtk/releases/tag/v1.3.0
2•patrick_rtk•15m ago•0 comments

Microsoft FreeHand Harness

https://github.com/microsoft/FreeHand
1•endangeredhuman•16m ago•0 comments

Rust rewrite of Blender: ~800x smaller, over 50x faster, 100x less RAM

https://www.reddit.com/r/aigamedev/comments/1yb7o7a/i_rewrote_blender_to_11mb_in_rust_800x_smaller/
3•KuhlMensch•16m ago•1 comments

Claude Ultra, Google AI Ultra are worth more than $10k a month at API prices

https://twitter.com/SemiAnalysis_/status/2128294227326926985
1•tosh•18m ago•1 comments

If free will is an illusion, what's left of intelligence?

https://medium.com/@meyborg/determinism-is-autocomplete-068269cd1e9d
2•Meyborg•20m ago•0 comments

Tecolot – Native Terminal for macOS

https://tecolot.com/
1•birdculture•21m ago•0 comments

Why untouched Go slices can end up in physical memory more often with GOMEMLIMIT

https://peng.fyi/post/unused-virtual-memory-can-use-physical-memory/
1•pengubco•22m ago•0 comments

Sony UAB-C200 USB-C DAC Announced

https://thewalkmanblog.com/2026/12/02/sony-uab-c200-usb-dac-announced/
1•haunter•23m ago•1 comments

Tell HN: Laravel Sheets

3•petervandijck•26m ago•0 comments

AI avatar glitches when asked to repeat "A" 100 times [video]

https://www.reddit.com/r/singularity/comments/1y7dknw/find_out_if_the_girl_youre_dating_online_is/
1•adererror•27m ago•0 comments

Pencils Down – AI agents that stop at every phase for human review

https://github.com/jamiemitchellconsultants/pencils-down
1•jamie_m_•30m ago•1 comments

PP-1 Turns Your iPhone into a Teenage Engineering OP-1 Inspired Pocket Studio

https://www.synthtopia.com/content/2026/12/01/pp-1-turns-your-iphone-into-a-teenage-engineering-o...
1•austinallegro•32m ago•0 comments

Nami – a simple alternative to Nix, devbox, devshell

https://namios.dev/
1•immij•32m ago•0 comments

RSI Bench: Measuring Whether AI Agents Can Improve Themselves

https://labs.scale.com/blog/rsi-bench
1•matt_d•33m ago•0 comments

Anatomy of an AI Kill Chain

https://ai-killchain.airwars.org
3•tastyface•39m ago•0 comments

Show HN: Production eBPF and XDP Tracing Toolkit for Linux Kernel Performance

https://github.com/grfdsasdvef/awesome-ebpf-linux-tracing
1•snowdensay•41m ago•0 comments

Up to 211% faster matrix multiplication on modern Apple Silicon

https://github.com/davedx/mlx-tachyon
1•davedx•42m ago•0 comments

SmartAutoFill AI Form Filler for repetitive web forms

https://smartautofill.com/
2•rikies•44m ago•0 comments

6 days ago: I have a sneaking suspicion that OpenAI is nearing a break in ECC

https://twitter.com/cass_on_mars/status/2126012218609213456
2•gdeglin•46m ago•1 comments

A common flaw in MCP server authentication may allow account takeovers

https://salt.security/blog/registered-is-not-trusted-one-click-account-takeovers-through-mcp-oauth
3•ynvb•47m ago•0 comments

Show HN: misa77 – Up to 3x faster decompression than zstd, with better ratios

https://github.com/welcome-to-the-sunny-side/misa77/tree/main
1•nonadhocproblem•50m ago•0 comments