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

Tell HN: GitHub Is Down

1•yuvadam•44s ago•0 comments

Krea 3 Technical Report

https://www.krea.ai/blog/krea-3-technical-report
1•ravenical•5m ago•0 comments

Show HN: Rexfeed – A tech feed in a Rex side pane while your coding agent works

https://github.com/alpcanaydin/rexfeed
1•alpcan•6m ago•0 comments

GraalVM 25.5: new optimizations and Python web framework

https://medium.com/graalvm/graalvm-25-5-is-here-19535117b14b
1•mike_hearn•10m ago•0 comments

Osewa – An open-source alternative to SSH and Mosh

https://osewa.dev/
1•dkpk•16m ago•0 comments

Show HN: Umbra – a autonomous Android agent with background screen control

https://github.com/chengmatt416/umbra
1•pinyen_cheng•20m ago•1 comments

Show HN: Md2docx – Compile Markdown directly into native Word documents

https://md2docx.js.org/
1•mayank1513•21m ago•0 comments

The Peruvian hotel with a terrifying check-in

https://www.bbc.com/travel/article/20261028-the-peruvian-hotel-with-a-terrifying-check-in
2•tosh•22m ago•0 comments

How I AI

https://blog.radix63.dk/posts/how-i-ai/
1•eisbaw•24m ago•0 comments

Ubuntu unattended-upgrades installs HAProxy version with a major regression

https://bugs.launchpad.net/ubuntu/+source/haproxy/+bug/2172897
3•sfkgtbor•24m ago•0 comments

Show HN: Hormuz Signal – Iran war escalation risk from real data

https://www.HormuzSignal.com/
2•mrPaul658•28m ago•0 comments

AI UI/UX designer: assign a ticket, get senior-reviewed Figma designs in 24-48h

https://ai.greensighter.com/
1•dakochamp•32m ago•0 comments

A Universe in the Ring: What If We Could Start Our Own Sandbox at CERN?

https://medium.com/system-weakness/a-universe-in-the-ring-what-if-we-could-start-our-own-sandbox-...
1•mkraft_berlin•33m ago•0 comments

ChatGPT and Work are merging soon, while ChatGPT Classic retires in January

https://9to5mac.com/2026/11/02/openai-is-retiring-chatgpt-classic-app-will-soon-combine-chat-and-...
1•tmarice•35m ago•0 comments

Geolocating any audio recording using flight data and the Doppler Effect

https://www.techradar.com/computing/cyber-security/youtuber-discovers-aircraft-noise-trick-that-c...
2•vrganj•42m ago•0 comments

Verification Is Not Knowledge: Science needs more than answers

https://blog.cosmos-institute.org/p/verification-is-not-knowledge
26•ersinesen•48m ago•6 comments

Flutter updates required to remediate the eMudhra certificate compromise

https://firebase.google.com/support/guides/compromised-emudhra-intermediate-ca
2•bitneuker•49m ago•0 comments

Milkman – The Better Alternative to Postman

https://milkman.dev/
5•jplunien•52m ago•3 comments

The Gacha game I play everyday, Nikke, was targeted by a supply chain attack

https://twitter.com/lauriferrd/status/2117655602843533509
3•katomegumi111•52m ago•0 comments

Show HN: Unsquatted – fast domain checker and curated list

https://unsquatted.com
2•vovahimself•53m ago•0 comments

Ideas for Testing Randomized Algorithms

https://timvieira.github.io/testing-randomized-algorithms/
2•bacr•53m ago•0 comments

Kitty 0.50

https://sw.kovidgoyal.net/kitty/changelog/#
68•porridgeraisin•53m ago•21 comments

Protocol Explorer

https://protocol-explorer-alpha.vercel.app/
2•giis•55m ago•0 comments

Show HN: Vegetable Gardening for Engineers

https://jrcpl.us/contrib/2020/gardening-for-engineers/
3•jrcplus•56m ago•0 comments

Observations from Running Stealmybitcoin.com

https://pavursec.com/blog/stealmybitcoin/
3•birdculture•56m ago•0 comments

First mistakes as an engineering manager

https://hypomanic.dev/first-mistakes-as-an-engineering-manager
4•molw•56m ago•2 comments

Better Auth Critical Vulnerabilities

https://better-auth.com/blog/security-release-2026-11-03
2•pranshuchittora•57m ago•0 comments

Hermes: A job-search agent that applies for you

https://github.com/shbernal/hermes-linkedin-jobsearch
2•shbernal01•57m ago•0 comments

Show HN: Headline Redline – track changes in News Headlines

https://headlineredline.com/
2•oyster143•57m ago•0 comments

In-browser code screenshot beautifier with zero server uploads

https://vault-pro.rashid-salimov96.workers.dev/en/tools/code-to-image/
2•badrasr•59m ago•0 comments