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

Recycler: Cost-Free Latent Reasoning via Hidden State Recycling

https://seed.bytedance.com/en/public_papers/recycler-cost-free-latent-reasoning-via-hidden-state-...
1•sgiannopoulos•50s ago•0 comments

"No human at the helm": Delaware plan would let AI agents run businesses

https://arstechnica.com/tech-policy/2026/10/no-human-at-the-helm-delaware-plan-would-let-ai-agent...
2•ndsipa_pomu•1m ago•0 comments

The whole site in five languages in 12 minutes, from the command line

https://swiftling.pro/whole-site-in-five-languages/
1•taubek•1m ago•0 comments

Show HN: FreeApply Apply to the new Job on the old Model

https://www.mybotsai.com/
1•StephenTynan789•2m ago•0 comments

Show HN: KI Song erstellen – German AI music from prompts and lyrics

https://kisongerstellen.com
1•Kevin_Guo•3m ago•0 comments

Random Number

https://www.getrandomnumber.org
1•blackethylene•6m ago•0 comments

Is a custom financial LLM a mirage? Lessons from BloombergGPT for IT leaders

https://businessmodelanalyst.com/is-a-custom-financial-llm-a-mirage-lessons-from-bloomberggpt-for...
1•Aninay•12m ago•0 comments

Building Delaunay Triangulations

https://www.adamgetchell.org/posts/2025-12-27-building-delaunay-triangulations/
1•ankitg12•17m ago•0 comments

D-dimensional Delaunay triangulations and convex hulls in Rust

https://github.com/acgetchell/delaunay
1•ankitg12•18m ago•0 comments

Behind the scenes of those Claude slopcore music videos

https://asteriskmag.substack.com/p/behind-the-scenes-of-those-claude
2•jbotz•18m ago•1 comments

Git-Cliff 2.14.0

https://git-cliff.org/blog/2.14.0/
1•ankitg12•19m ago•0 comments

Before you fine-tune, compile: lessons from a payment-risk experiment

https://seldon-ai.com/blog/before-you-fine-tune-compile
1•nlpnerd•21m ago•0 comments

Claude versus "GPU'less AI architecture" reasoning competition

https://fleetingswallow.com/claude-vs-gpuless-ai-a-reasoning-showdown/
1•edwardchalk•25m ago•2 comments

CEOs are coding again – Amir Salihefendic, CEO of Todoist [video]

https://www.youtube.com/watch?v=Q8xEGnJgOzQ
1•mpweiher•25m ago•0 comments

Ask HN: Responsible Use of Agents for Cybersecurity

1•teekert•28m ago•0 comments

Discord is making messages from public servers discoverable on search engines

https://twitter.com/malwarebytes/status/2115206474192339322
2•taubek•34m ago•0 comments

Rocky Linux Creator Built a New "Not Linux" Kernel in 11 Days Using AI

https://itsfoss.com/news/ginux/
2•zoobab•34m ago•1 comments

Show HN: Self-diagnosis of vulnerabilities such as PHP2Shell via IP/Domain

https://aipentest.jclab.kr/selfcheck
1•joseph2024•37m ago•0 comments

The Bitter Lesson for Humans

https://gfrm.in/posts/bitter-lesson-for-persons/
1•slygent•38m ago•1 comments

Amazon EC2 I7i instances are now available in Amazon Web Services China regions

https://www.amazonaws.cn/en/new/2026/amazon-ec2-i7i-instances/
1•Chinaready•41m ago•0 comments

UniFi Long-Range Poe Switching

https://blog.ui.com/article/introducing-unifi-long-range-switching
3•janandonly•47m ago•0 comments

NoFlo 2.x Is Coming

https://bergie.iki.fi/blog/noflo-20-prep/
1•bergie•47m ago•0 comments

Pell Puzzles Review

https://dles.gg/reviews/pell-puzzles
1•trizoza•47m ago•0 comments

Show HN: NoVul – Open-source Mac app to Find and fix vulnerabilities on your Mac

https://github.com/misbahsy/novul
2•misbahsy•48m ago•0 comments

IanVisits turns twenty – two decades of exploring London

https://www.ianvisits.co.uk/articles/ianvisits-turns-twenty-two-decades-of-exploring-london-93536/
3•edent•49m ago•1 comments

AI is the real Soylent Green

https://www.danaco.se/ai-is-the-real-soylent-green/
2•zenbryo•54m ago•1 comments

Show HN: NoVul – Find and Fix Vulnerabilities On

1•misbahsy•55m ago•0 comments

Show HN: A Lego-like composable Framework for RSI

https://rsi-gear.github.io/
11•ethan1998•56m ago•0 comments

Show HN: Earithmetic – multiply in your head when digits are notes or rhythms

https://vernetit.github.io/earithmetic/
1•quietcircuit•58m ago•0 comments

Show HN: Hackerscad – Code-first CAD with MCP server for AI agents

https://hackerscad.com/
1•Kapendev•59m ago•0 comments