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

Recording device hidden in toilet paper found in top-secret OpenAI meeting room

https://arstechnica.com/tech-policy/2026/10/fbi-arrests-openai-engineer-suspected-of-planting-bug...
1•sbulaev•4m ago•0 comments

LFM2.5-24B-A2B: Built for Fast On-Device Agents

https://www.liquid.ai/blog/lfm2-5-24b-a2b
9•gmays•12m ago•0 comments

One-Shot San Francisco Homeless Shooter from Y Combinator Alum

https://twitter.com/plbiojout/status/2110182960658018732
1•tclancy•16m ago•2 comments

YouTube Is Looking to Expand into Audiobooks

https://www.wsj.com/business/media/youtube-is-looking-to-expand-into-audiobooks-d28bd876
1•mikelgan•18m ago•0 comments

Readers Digest: How Dentists Rip Us Off (1977) [pdf]

https://asset.cdocs.com/uploads/forum/attachments/258722/ReaderDigestArticle.pdf
1•hooch•19m ago•0 comments

Democrats fear more 'October surprises' after 'bullshit' raid

https://news.lavx.hu/article/democrats-fear-more-october-surprises-after-bullshit-raid-on-ilhan-o...
2•abdelhousni•21m ago•0 comments

Custom server to revive neato bots

https://github.com/vacuula/vacuula
1•matttah•23m ago•0 comments

Nvidia reportedly halts GeForce RTX 5090 production

https://www.tomshardware.com/pc-components/gpus/nvidia-reportedly-halts-geforce-rtx-5090-producti...
1•kristianp•27m ago•0 comments

A new model for open source: closed to pull requests, open to remix

https://ghuntley.com/remix/
2•ghuntley•31m ago•0 comments

Sunsetting Decomp.dev

https://decomp.dev/
2•Encounter•31m ago•0 comments

Against Big Tech Credentialism

https://alexwennerberg.com/blog/2026-04-16-credentials.html
2•nsm•32m ago•0 comments

Chaos ensues when AI interviewer meets AI interviewee

https://www.theregister.com/offbeat/2026/10/14/chaos-ensues-when-ai-interviewer-meets-ai-intervie...
5•mikelgan•39m ago•0 comments

Ask HN: Demonstrating Skills When Everything Is a Prompt

2•Brisk4t•39m ago•0 comments

Ben Affleck Sold His AI Company for $587M [video]

https://www.youtube.com/watch?v=MzXEWrT3Ld8
1•dboreham•40m ago•0 comments

Bank of America added 1k contractors to patch AI-exposed software flaws

https://runtimewire.com/article/bank-of-america-mythos-contractors-software-patching
5•runtimewire•46m ago•1 comments

Epic Games Launcher Preview

https://launcher.epicgames.com/
2•runtimewire•47m ago•0 comments

Local Model Guide – Find what LLMs fit on your machine

https://localmodelguide.com/
1•hiveindex•47m ago•0 comments

Netflix lays off 6% of staff in biggest job cuts since 2022

https://finance.yahoo.com/video/netflix-lays-off-6-of-staff-in-biggest-job-cuts-since-2022-134352...
3•BiraIgnacio•48m ago•0 comments

The genetic technique that finds almost every infection

https://web.archive.org/web/20261014232102/https://www.bbc.com/future/article/20261013-how-metage...
1•BiraIgnacio•48m ago•1 comments

1991 Federal Panel Blasted Vaccine Unavailability That Led to a Measles Epidemic

https://www.techdirt.com/2026/10/13/in-1991-federal-panel-blasts-vaccine-unavailability-that-led-...
1•hn_acker•48m ago•1 comments

TezGrid: AI inference on idle computers

https://tezgrid.com/
1•ms7892•49m ago•0 comments

GGUF: GGML Universal File

https://en.wikipedia.org/wiki/GGUF
2•teleforce•50m ago•0 comments

Frontier models score under 2/100 controlling a simulated humanoid

https://www.vals.ai/benchmarks/robo_bench
6•miyukimatthews•50m ago•0 comments

Anthropic Revenue Jumps to $16.8B in Quarter Before IPO

https://www.bloomberg.com/news/articles/2026-10-14/anthropic-revenue-jumps-to-16-8-billion-in-qua...
3•marc__1•53m ago•1 comments

Lunchables of UI Work

https://blog.exe.dev/implementation-fidelity
1•azimman•54m ago•0 comments

Backlash against data centres could shape the US midterm elections

https://www.bbc.com/news/articles/c0rezqpnekro
1•dabinat•58m ago•2 comments

RustGIS

https://rustgis.app/
2•jonbaer•58m ago•0 comments

Ablation is an autonomous reverse engineering system

https://github.com/Ablation-Tool/ablation
1•zellkernel•1h ago•0 comments

Things we wish we'd known before building an AI chat agent

https://trigger.dev/blog/seven-tips-for-building-better-chat-agents
1•shikhar•1h ago•0 comments

DHS Inspector General: TSA Is Not Safeguarding Passenger Facial Recognition Data

https://www.eff.org/deeplinks/2026/10/dhs-inspector-general-finds-tsa-not-properly-safeguarding-p...
7•hn_acker•1h ago•1 comments