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

Anthropic's AI coding boom pushed it to replace Git

https://www.businessinsider.com/anthropic-claude-ai-coding-git-scion-2026-12
1•ghernando•2m ago•0 comments

Show HN: First-Day Reset

https://inflectionpoint.me/reset/
1•nickrae•2m ago•0 comments

Cities are for people, not cars

https://blauhai.at/articles/cities-are-for-people-not-cars
2•mwlica•4m ago•0 comments

Ethereum Foundation says that cryptography behind Tornado Cash considered broken

https://www.web3isgoinggreat.com/?id=ethereum-foundation-bn254-warning
1•mindracer•5m ago•0 comments

There was no briefing. They lied

https://twitter.com/mikebelshe/status/2129320672166101406
2•dmitrygr•5m ago•0 comments

British spies tracking potentially serious risks involving AI and bio weapons [video]

https://www.youtube.com/watch?v=B7B0FaxazeI
1•Bender•10m ago•0 comments

Dasha: PostgreSQL Perfomance Dashboard

https://github.com/dbulashev/dasha
1•thunderbong•10m ago•0 comments

Bad Apple on a Blu-ray

https://twitter.com/chiu_hans/status/2129551471918420202
2•sb057•12m ago•0 comments

Liquid-metal security device resists physical and AI-based cloning

https://techxplore.com/news/2026-12-liquid-metal-device-hidden-thermal.html
2•geox•14m ago•0 comments

Cartographer-Map a legacy Python codebase(call graph,blast radius, grounded Q&A)

https://github.com/zerocopies/codebase-cartographer
1•ZeroCopies•18m ago•0 comments

Social Skills Have a Fat Right Tail

https://psychotechnology.substack.com/p/social-skills-have-a-fat-right-tail
2•eatitraw•19m ago•0 comments

Advent of Places: Kelly Butte

https://computer.rip/2026-12-04-advent-4.html
1•aray07•22m ago•0 comments

Rambling thoughts on LLM consistency and harness inflexibility

1•our_are_why•26m ago•0 comments

MedGemma 2: Advanced open model for healthcare

https://blog.google/innovation-and-ai/technology/health/medgemma-2/
2•gmays•26m ago•0 comments

Red Delicious – An Apple Silicon Port of the Red Language

https://github.com/JeanHuguesdeRaigniac/red-delicious
1•jhderaigniac•28m ago•1 comments

Comparing frontier pretraining without sharing held-out data or model weights

https://ntt123.github.io/compare-frontier-pretraining/
1•xcodevn•29m ago•0 comments

Primecoin

https://en.wikipedia.org/wiki/Primecoin
2•spzx•31m ago•0 comments

Experts warn SpaceX's million-satellite plan threatens safety and environment

https://www.cbc.ca/news/science/spacex-million-satellites-data-centres-9.7446629
7•devonnull•32m ago•0 comments

Ask HN: What are the errors you experience most on K8s?

1•docdiesel•32m ago•0 comments

Problematic Cryptography Math

https://cookie.engineer/weblog/articles/problematic-cryptography-math.html
1•WhyIsItAlwaysHN•35m ago•0 comments

Why reward optimization pushes AI agents to evade safety monitors(Bengio et al.)

https://arxiv.org/abs/2612.04113
3•datascientist•36m ago•0 comments

Create 2D and 3D games with Google Labs' Pillowfort

https://blog.google/innovation-and-ai/models-and-research/google-labs/try-pillowfort/
2•gmays•37m ago•0 comments

Show HN: Every train in Austria and Switzerland in 3D, running on its timetable

https://world.cyntro.at
1•MichaelLabitzke•37m ago•0 comments

Show HN: Autotune – Genetic LLVM phase-ordering CLI that beats Clang -O3

https://github.com/youknowme19/Autotune-The-Phase-Ordering-CLI-Doctor
1•sandy191020•39m ago•0 comments

Hotspot Performance Engineering Fails

https://lemire.me/blog/2023/04/27/hotspot-performance-engineering-fails/
1•tosh•39m ago•0 comments

AI's Half-Used Data Centers

https://www.isambrooks.com/p/ais-half-used-data-centers
2•HSO•39m ago•1 comments

MTP with nearly no overhead and extra compute cost

https://x.com/Qvinfor/status/2129627007114002584?a=gx3imp8mxjpyhc0YDG4&s=20
5•Dor_frem•40m ago•0 comments

My home server setup: coding agents, dev servers, and more

https://www.alara.blog/my-home-server-setup-coding-agents-dev-servers-and-more/
2•ingve•41m ago•0 comments

What the labs aren't telling us

https://www.amapel.me/what-the-labs-arent-telling-us
1•pellicceama•42m ago•0 comments

Show HN: TOKO – A lightweight desktop app to cook prompts first

https://donovan-ratefison.github.io/toko/
1•Donovan-R•44m ago•1 comments