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

AGI brain project. I wonder whether anybody would like to join in and help me?

2•AGIEnthusiast•1m ago•0 comments

Public Schools' Eye of Sauron

https://www.educationnext.org/public-schools-eye-of-sauron-student-surveillance-merrill-v-marana-...
1•Tomte•3m ago•0 comments

MCP server integration for DaVinci Resolve Studio

https://github.com/samuelgursky/davinci-resolve-mcp
1•rldjbpin•3m ago•0 comments

Show HN: AgentPulse – Claude Code and Codex status in tmux

https://github.com/jerriclynsjohn/tmux-agent-pulse
1•jerriclynsjohn•5m ago•0 comments

Claude, change the "Add to Cart" button to blue

https://opusfived.dev/
2•matthieu_bl•7m ago•0 comments

What's New in Houdini 22

https://www.sidefx.com/products/whats-new-in-h22/
1•embedding-shape•8m ago•0 comments

CopyWheel – a radial snippet menu for macOS (native, 1 MB)

https://github.com/weselski/copywheel
1•kweselski•9m ago•0 comments

OpenClaw v2026.9.3: Live browser automation, persistent skills, and cloud work

https://docs.openclaw.ai/releases/2026.9.3
1•CoderLim110•14m ago•0 comments

MemCP – Faster than MySQL and Postgres by up to 90x

https://github.com/launix-de/memcp
1•carli2•15m ago•1 comments

Losing control of AI is the plan

https://www.theargumentmag.com/p/losing-control-of-ai-is-actually
3•DGAP•16m ago•0 comments

Show HN: Agent payments by social handles (not Stripe-based, not on bank rails)

https://github.com/Quidli/connect-mcp
1•jahn716•16m ago•0 comments

Tokendiet – see what your Claude Code session costs, for zero tokens

https://github.com/mcancellotti/tokendiet
1•mcancellotti•17m ago•0 comments

Solving the Dilemma of Screen Time

https://www.gse.harvard.edu/ideas/ed-magazine/26/04/solving-dilemma-screen-time
1•Tomte•18m ago•0 comments

Booting Linux [pdf]

https://www.almesberger.net/cv/papers/ols2k-9.pdf
1•ankitg12•19m ago•0 comments

Silicon Valley-backed Covenant unveils low-cost, mass-producible cruise missile

https://www.reuters.com/business/aerospace-defense/silicon-valley-backed-covenant-unveils-low-cos...
1•Hoasi•20m ago•0 comments

The Reinvention of Liberal Arts Colleges

https://www.educationnext.org/reinvention-of-liberal-arts-colleges-higher-education-brandeis-univ...
1•Tomte•24m ago•0 comments

Anthropic aligment lead warns about extinction by AI

https://twitter.com/EvanHub/status/2097497037956891126
1•margorczynski•24m ago•1 comments

Amazon Profitability Calculator

https://clarisix.com/amazon-profitability-calculator
1•claudiuclement•26m ago•0 comments

Mapped: Europe's Biggest Budget Deficits

https://www.visualcapitalist.com/mapped-europes-biggest-budget-deficits/
1•leonidasrup•27m ago•0 comments

Y Combinator, Mapped

https://dashboard.vclense.ch/ycglobe
1•plurby•28m ago•0 comments

PHP is Dead (and AI is to blame)

https://www.lifeofguenter.de/2026/09/php-is-dead-and-ai-is-to-blame
1•lifeofguenter•33m ago•0 comments

Show HN: Impress your boss with interactive Scikit-Learn Decision Tree

https://github.com/mljar/supertree
2•pplonski86•35m ago•0 comments

What makes $BigTechCompany's products bad, anyway?

https://herecomesthemoon.net/2026/09/why-is-big-tech-bad/
2•birdculture•36m ago•0 comments

Show HN: Project Estimator – a free, no sign-up software cost estimator

https://project-estimator.webround.net/
1•LucaSiviero•37m ago•0 comments

US claims Chinese AI firms are carrying out 'industrial-scale' theft

https://www.cnn.com/2026/09/08/politics/us-accuses-china-of-stealing-ai-technology
4•jllyhill•38m ago•1 comments

Primework by Kunst X

https://kunstx.online/primework/
2•kunstx•38m ago•1 comments

Bristol Myers' blood cancer cell therapy succeeds in mid-stage trial

https://www.reuters.com/business/healthcare-pharmaceuticals/bristol-myers-blood-cancer-cell-thera...
2•thunderbong•39m ago•0 comments

How Much of the Internet Is Written with AI?

https://www.pewresearch.org/data-labs/2026/08/20/how-much-of-the-internet-is-written-with-ai/
3•dp-hackernews•39m ago•0 comments

Steam now requires Australian users to verify their age with a credit card

https://www.reddit.com/r/Games/comments/1wbauz5/steam_now_requires_australian_users_to_verify/
2•haunter•39m ago•0 comments

Show HN: CreepyLink: A fun tool to turn safe URLs into suspicious looking links

https://www.creepylink.online
1•tangjei•42m ago•0 comments