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

Show HN: CFP Tracker – Track Conference CFPs in Obsidian

https://github.com/sujee/cfp-tracker
1•sujee_dev•37s ago•0 comments

Embedding model in tool search is A LIE

https://github.com/vmoranv/jshookmcp
1•vmoranv•1m ago•0 comments

Show HN: Best Stock Investments Ideas Maz Vantage

https://www.mazvantage.com/ideas
2•YakubYilmaz•7m ago•0 comments

Can We Fix AI?

https://peterbloem.nl/blog/fix-ai-data
1•riskone•7m ago•0 comments

In which John becomes a Machine Learning researcher

https://johnwickerson.wordpress.com/2026/09/26/in-which-john-becomes-a-machine-learning-researcher/
1•xiaoyu2006•8m ago•0 comments

Show HN: Blue-harness – audit and harden binaries against AI-assisted reversing

https://github.com/seifheakal/blue-harness
1•SeifHeakal•10m ago•0 comments

Show HN: Maz Vantage Stock Research and Analysis Platform

https://www.mazvantage.com
2•YakubYilmaz•14m ago•0 comments

Can You Trust AI Cybersecurity Tools?

https://forenclarity.com/can-you-trust-ai-cybersecurity-tools/
3•yosefmor•15m ago•0 comments

Alter Schwede: The Rock That Came from Sweden

https://alsterrunde.com/alter-schwede-the-rock-that-came-from-sweden/
3•mertbio•18m ago•1 comments

Espressif Posts a Linux BSP for the ESP32-S31

https://blog.adafruit.com/2026/08/25/espressif-posts-a-linux-bsp-for-the-esp32-s31/
2•teleforce•20m ago•0 comments

Peripeteia

https://en.wikipedia.org/wiki/Peripeteia
3•chistev•23m ago•0 comments

Men and Women Are Diverging Ideologically

https://www.city-journal.org/article/men-women-political-divide
4•barry-cotter•28m ago•1 comments

The Physical Origin of Torque and of the Rotational Second Law(2015)

https://scholarship.haverford.edu/cgi/viewcontent.cgi?article=1494&context=physics_facpubs
3•num42•28m ago•0 comments

Show HN: Figma Like AI Landing Page Builder

https://codecainehq.com/
5•sahil•29m ago•0 comments

Show HN: Brief2mp4 – ClaudeCode/Codex skill that checks videos against the brief

https://github.com/qualixar/brief2mp4
3•vpbhardwaj•31m ago•0 comments

FDA Rejects Closely Watched Lung Cancer Drug from China

https://www.nytimes.com/2026/11/15/business/fda-lung-cancer-drug-china.html
4•madihaa•33m ago•0 comments

S3rg: Grep for object storage, written in Rust

https://github.com/xiaofan-luan/s3rg
4•redskyluan•34m ago•0 comments

Capsules: Shared memory your agents can hand off – and you can read

https://github.com/OddballInnovator/Huffl-skill/blob/main/blog/capsules.md
3•rohitb7uw•38m ago•0 comments

TrustGraph – ACLs that follow the data through your AI agents

https://github.com/skishore23/trustgraph
2•skishore23•42m ago•0 comments

Show HN: TalentRadar – 3D geospatial tech compensation and role radar

https://ais-pre-keikksd2dcsi4qe6bzstuj-50566079524.europe-west2.run.app/__cookie_check.html?retur...
2•otto1302•47m ago•0 comments

Hibana: Fast Agentic Inference on Unified-Memory Devices

https://sharar-project.github.io/blog/sharar-paper/
2•matt_d•48m ago•0 comments

cudamemcpy-tuner: cudaMemcpying up to 5x faster on a B300

https://maknee.github.io/blog/2026/CudaMemcpy/
2•matt_d•54m ago•0 comments

Microarchitectural Leakage on AMD Processors Through Instruction Fuzzing

https://www.research-collection.ethz.ch/server/api/core/bitstreams/1856c6bd-99fc-4e0e-88d5-33d18b...
2•barbito•57m ago•0 comments

Atomic Nuked Veteran

https://www.armscontrolwonk.com/archive/201309/atomic-nuked-veteran/
3•hubraumhugo•57m ago•0 comments

GrapheneOS calls Linux a "human slop kernel" and slams its security flaws

https://twitter.com/GrapheneOS/status/2122074518437134627
3•d3Xt3r•57m ago•2 comments

Epistemological Debt: On the Irreversible Loss of Non-Formalized Knowledge

https://medium.com/@smoking2man/epistemological-debt-on-the-irreversible-loss-of-non-formalized-k...
2•Aldus551•57m ago•0 comments

Show HN: Jensen World – a Factorio mod for GPU nerds

https://mods.factorio.com/mod/gpu_factorio_mod
2•axdv•58m ago•0 comments

Skills for AI coding agents to create diagrams in Markdown

https://github.com/markdown-viewer/skills
2•ankitg12•59m ago•0 comments

Slam Dunk: A Recipe for Long-Horizon Egocentric Slam in the Wild

https://www.alphaxiv.org/abs/2611.slam-dunk
2•gmays•59m ago•0 comments

Flova AI

https://www.crunchbase.com/organization/flova-tech-inc
2•Alfredlovin•1h ago•0 comments