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

The Internet of Snails: Escargotic commotion and the wood-wide web (2015)

https://cabinetmagazine.org/issues/58/smith.php
1•nz•2m ago•0 comments

Be skeptical of OpenAI's rogue hacker agent story

https://www.theguardian.com/technology/2026/jul/24/openai-rogue-hacker
2•rwmj•3m ago•0 comments

Proving a Human Wrote Something

https://gjtorikian.online/posts/proving-a-human-wrote-something/
2•gjtorikian•3m ago•0 comments

Unitree As2-W

https://www.unitree.com/As2-W/
2•MehrdadKhnzd•4m ago•0 comments

History of John Backus's functional programming project [draft]

https://softwarepreservation.computerhistory.org/FP/
1•cwbuilds•4m ago•0 comments

Show HN: I made Rung a daily word/clue game of nerve

https://dailyrung.com/
1•amaanster•6m ago•1 comments

Show HN: Poddie – A local-first, text-based video and podcast editor

https://github.com/SinanTang/poddie
1•sinan_tang•8m ago•0 comments

I Started Answering a Command I Was Built to Ignore – Helge Sverre

https://helgesver.re/articles/claude-code-bang-command-caveat
1•pkaeding•8m ago•0 comments

Micro-SaaS Is Dead. Service With A Software Replaces It

https://adriengonin.com/writing/service-with-a-software/
1•Adrig•8m ago•0 comments

Show HN: An AI agent skill repo built around evals, not demos

https://github.com/sourishkrout/skills
1•sourishkrout•9m ago•0 comments

China Wields Its Rare Earth Leverage over Europe with New Export Controls

https://www.nytimes.com/2026/07/24/business/china-europe-rare-earths.html
2•mikhael•9m ago•0 comments

Asked Codex to redesign a page; it pushed my repo to OpenAI infra

https://bhanu.io/blog/codex-pushed-my-private-repo-to-an-openai-server
1•npmn•10m ago•0 comments

Built something new for developers today

https://www.indiehackers.com/post/built-something-new-for-developers-today-1816e90324
1•pulseboardai•12m ago•0 comments

PlayStation Services Down

https://status.playstation.com/en-us/
1•khebbie•13m ago•0 comments

Orbit – a local-first interface to Slurm

https://github.com/vertices-solutions/orbit
2•lubitelpospat•13m ago•0 comments

Ask HN: Is GitHub Down?

2•ustad•14m ago•1 comments

How We Pushed CDC into Postgres

https://www.snowflake.com/en/blog/engineering/postgres-to-snowflake-replication-mirroring/
2•craigkerstiens•15m ago•0 comments

Infisical Privileged Access Management

https://infisical.com/blog/introducing-infisical-pam
1•FinnLobsien•17m ago•0 comments

The Direct and Indirect Effects of Genetics and Education

https://arxiv.org/abs/2607.19562
1•StatsAreFun•18m ago•0 comments

Show HN: Drive your real logged-in Chrome from Claude Code and Codex (MCP)

https://github.com/vitalysim/browser-bridge
1•vitalysim•18m ago•0 comments

Show HN: LanView CLI – Fixing the localhost problem when testing on your phone

https://github.com/PrashantDhuri08/lanview-cli
1•prashantdhuri08•19m ago•0 comments

Tell HN: ChatGPT exports do not contain all conversation messages

1•afpx•19m ago•0 comments

Show HN: A 100% client-side steganography tool to hide messages in images

https://zlvox.com/blog/free-steganography-tools-2026-hide-messages-in-images
2•mrdisloyal•20m ago•0 comments

Shaming Electrek on Their AI Bullshit

https://www.dgriffinjones.com/extraordinary/electrek.html
1•dgriffinjones•23m ago•0 comments

How Fast Is the Universe Really Expanding?

https://www.quantamagazine.org/how-fast-is-the-universe-really-expanding-20260723/
2•Brajeshwar•23m ago•0 comments

TQuel Paper: Implementing Temporal Operators in Postgres

https://illuminatedcomputing.com/posts/2026/07/tquel-paper/
2•plaur782•25m ago•0 comments

AI Coding will Prevent Expertise – The need for friction in skill formation

https://larsfaye.com/articles/ai-coding-will-prevent-expertise
2•larsfaye•25m ago•1 comments

Show HN: Jixp, a Lisp DSL for describing Jax neural nets

https://github.com/baileywickham/jixp
1•baileywickham•26m ago•0 comments

New Jersey bans grocery stores from using shoppers' personal data to set prices

https://jerseyvindicator.org/2026/07/23/new-jersey-bans-grocery-stores-from-using-shoppers-person...
3•randycupertino•26m ago•0 comments

Better on-device dictation and cleanup for Mac with Model 4

https://www.epilude.com/news/introducing-model-4
2•brmkr•27m ago•0 comments