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

Being a kid making games in the early 2000s

https://jaytholen.net/teengamedev/
1•farmerbb•1m ago•0 comments

AI isn't slop. It's just the generic average. And not you

https://www.catchkill9.dev/posts/voiceprint-open-source.html
1•lnahum•1m ago•0 comments

Omarchy 4.5 floats, speaks 50 languages, and runs on your Mac

https://omarchy.org/news/2026/11/omarchy-4-5/
2•fratellobigio•3m ago•0 comments

Altera Announces Agilex 2X, a Complete FPGA and SoC Portfolio

https://www.altera.com/newsroom/agilex-2x
2•gmays•8m ago•0 comments

How software engineering is changing: a tale of two eras

https://newsletter.pragmaticengineer.com/p/how-software-engineering-is-changing
1•duck•12m ago•0 comments

The API client microcosm of the VC shit economy

https://blog.outmanos.com/posts/the-api-client-cycle/
1•steinsgatezero•13m ago•0 comments

Show HN: Atlas Streak

https://crux.quest/atlas/
1•saretup•13m ago•0 comments

Big Tech claims voters' AI backlash is "anti-Trump" not "anti-tech"

https://arstechnica.com/tech-policy/2026/11/big-tech-claims-voters-ai-backlash-is-anti-trump-not-...
1•cdrnsf•17m ago•1 comments

Welcome to Wlroots How to make a compositor from scratch

https://nekidev.github.io/2026/11/04/1-welcome-to-wlroots-part-2.html
1•nyeki•17m ago•0 comments

Reasoning Models Can Control Their CoT When They Tell Themselves To

https://arxiv.org/abs/2610.23257https://github.com/udolev/Self-Instructed-CoT-Controllability
1•matt_d•18m ago•0 comments

Show HN: Sunlith, an Android calendar you can control through MCP

https://github.com/SunSinD/Sunlith
1•SunSinD•21m ago•0 comments

Show HN: Hosted MCP server for 16 crypto exchanges and MetaTrader 5

https://github.com/AlgoVesta/mcp
1•AlgoVesta•27m ago•0 comments

LifeVal: Evaluating AI Model Performance on Personalized Agentic Consumer Tasks [pdf]

https://cdn.openai.com/pdf/lifeval.pdf
2•pr337h4m•29m ago•0 comments

OpenAI Had 'Rough' First Half of Year Before Coding Takeoff

https://www.wsj.com/tech/openai-had-rough-first-half-of-year-before-coding-takeoff-brockman-says-...
1•nsagent•30m ago•0 comments

Critical thinking when agents do the work

https://twitter.com/addyosmani/status/2117512471930167377
1•rzk•33m ago•0 comments

Secure meeting room for humans that AI can't see

https://qube.so
2•iftyy•33m ago•0 comments

Tolerance Labs

https://tolerancelabs.ai/
2•tushar31gupta•39m ago•0 comments

Panini's Ashtadhyayi for the Curious [video]

https://www.youtube.com/watch?v=GTBiCYeogas
1•hanstospace•42m ago•1 comments

Some Memories of Early Anthropic

https://nothinghuman.substack.com/p/some-memories-of-early-anthropic
2•johnnyApplePRNG•45m ago•0 comments

Automated DNA Sequencing

https://www.nature.com/articles/d41586-026-03552-8
1•dackdel•46m ago•1 comments

Obel Mono Masked: A typeface that keeps a secret

https://typographic.systems/journal/a-typeface-that-keeps-a-secret
3•ryzvonusef•48m ago•1 comments

I drew these autumn trees with mathematical equations

https://twitter.com/naderi_yeganeh/status/2117974594455818465
1•theanonymousone•52m ago•0 comments

Nebius Launches Live GPU Spot Prices

https://nebius.com/spot-prices
1•htrp•53m ago•1 comments

Open-weight AI models can exploit the patch gap

https://epoch.ai/publications/open-weight-models-patch-gap
1•gmays•1h ago•0 comments

Architecture Converges with the Human Form in Gormley's Body Buildings(2025)

https://www.thisiscolossal.com/2025/08/antony-gormley-body-buildings/
1•num42•1h ago•0 comments

Lemmings CSS Animation

https://markblah.github.io/lemmings/
10•MarkBlah•1h ago•2 comments

European orbiter detects fresh hints of volcanic activity on Mars

https://phys.org/news/2026-11-european-orbiter-fresh-hints-volcanic.html
1•geox•1h ago•0 comments

<removed>

3•justauserid•1h ago•3 comments

Cold-start test: 8 agent sites, 2 cold writes, 97 logged requests

https://pub-a941bfd863a24f91a60e6c4979c18a84.r2.dev/pi-sandbox-uploads/362853802061074432/2026-11...
1•leon_fieldtest•1h ago•0 comments

Removing Binder.c

https://lwn.net/Articles/1102982/
1•MBCook•1h ago•0 comments