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

/Dev/Null Friends

https://hyloxira.pika.page/posts/devnull-friends
1•altilunium•1m ago•0 comments

P=BQP?

https://tech.yahoo.com/cybersecurity/articles/report-reveals-secret-encryption-discovery-20273969...
1•yegortk•2m ago•0 comments

See turbulence on your flight in real time

https://bumpy.flights/
1•k0mplex•3m ago•0 comments

Verified LLM-Based Query Rewriting for Microsoft SQL Server

https://al.radbox.org/doi/10.14778/3827998.3828074
1•matt_d•3m ago•0 comments

Lego Mindstorms (EOL) control/code app

https://zibrick.com/
1•dexif•4m ago•1 comments

I made a thing, Claude Wrapped 2026

https://claude.ai/artifact/HhycTJBv68VtudDyMd3acJ
1•spirosbax•7m ago•0 comments

Host your own "classic cable" with your own media library

https://play.google.com/store/apps/details?id=com.nostalgiatv&hl=en_US
1•rabuse•12m ago•1 comments

'I think he's lying': Takeaways from Jensen Huang's bruising testimony

https://www.politico.com/news/2026/12/03/i-think-hes-lying-inside-jensen-huangs-bruising-testimon...
2•gwu78•15m ago•0 comments

Measuring LLM judge errors with edited RAG answers

https://internals.laxmena.com/p/should-you-trust-your-llm-judge-not
1•laxmena•17m ago•0 comments

Man dies after eating cheesesteak, deepening mystery of tick-linked allergy

https://arstechnica.com/health/2026/12/killed-by-a-cheesesteak-man-dies-from-mysterious-tick-link...
1•colinprince•18m ago•0 comments

Nvidia's chips trained a Chinese satellite's AI. Iran used it to attack the US

https://www.cnbc.com/2026/12/03/nvidia-china-iran-satellite-attack.html
1•cisc•21m ago•0 comments

Transcript of Jensen Huang's closed-door testimony

https://www.nytimes.com/interactive/2026/12/04/us/04jensen-huang-nvidia-live-transcript.html
3•donohoe•23m ago•0 comments

Quantum resource estimates for computing elliptic curve discrete logarithms

https://arxiv.org/abs/1706.06752
1•networked•23m ago•0 comments

Ask HN: What's the best book you read this year?

3•laxmena•24m ago•2 comments

Millennium Prize Problems Update

https://www.claymath.org/news/millennium-prize-problems-update/
2•jonbaer•31m ago•0 comments

Hugging Face CEO: OpenAI,Anthropic,Google Each Control as Much Compute as China [video]

https://www.youtube.com/watch?v=41YCqYYxq_Y
1•diskmuncher•34m ago•0 comments

OpenAI math papers: exotic four-spheres, smooth Poincaré conjecture false

https://github.com/openai/math/tree/main/preprints/Exotic-four-spheres-detected-by-Khovanov-homol...
3•acossta•38m ago•0 comments

EU antitrust chief Ribera backs digital tax on Big Tech, calls it 'peanuts'

https://www.reuters.com/business/retail-consumer/eu-antitrust-chief-ribera-backs-digital-tax-big-...
2•gwu78•39m ago•0 comments

Make Me a Million-Bench: a benchmark where AIs build companies in the real world

https://andonlabs.com/evals/mmm-bench
1•lukaspetersson•44m ago•0 comments

A Single HTML P2P Chat – The Simplest Functional Chat App on the Internet

https://github.com/kgacorp/onefilechat
1•pltc•45m ago•1 comments

AI-Generated Math Is Littered with Problems. Humans Are Trying to Fix It with AI

https://www.wired.com/story/ai-generated-math-problems-humans-fix-it/
1•gwu78•45m ago•0 comments

Show HN: I built the world's strongest classical chess engine

https://twitter.com/jackyuan35/status/2128994871952462199
2•jackyuanybt•50m ago•0 comments

The Real Reason Elon Musk Keeps Insisting DOGE Cuts Killed "Zero" Kids

https://newrepublic.com/article/213533/elon-musk-economist-interview-doge-cuts-killed-zero-children
4•tastyface•53m ago•0 comments

People Are Adding Typos to Their Writing to Seem Less Like AI

https://www.nytimes.com/2026/12/03/style/ai-writing-text-typos.html
1•bookofjoe•56m ago•2 comments

Ask HN: What is the best Social Engineering book?

1•s_u_d_o•1h ago•1 comments

Parkhausradar, Munich's parking guidance system online

https://github.com/it-at-m/Parkhausradar
1•doener•1h ago•0 comments

Show HN: Learn Git in the Browser

https://learn-git.jrsjackson26.workers.dev/
1•jonnyjackson26•1h ago•0 comments

My OpenAI Dot made a discovery without me asking

https://echo.ls/dots-cwc/
88•maplet•1h ago•20 comments

Where else does P-256 live?

https://unmitigatedrisk.com/2026/12/where-else-does-p-256-live/
2•tomwas54•1h ago•1 comments

Show HN: Pi-tva-toolbox Session-tree tools for the Pi coding agent

https://github.com/asakin/pi-tva-toolbox
1•asakin•1h ago•0 comments