frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•10mo 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•10mo 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•10mo 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).

China's DJI sues rival Insta360 for alleged patent infringement

https://www.scmp.com/tech/article/3347580/chinas-dji-sues-rival-insta360-alleged-patent-infringem...
1•teleforce•44s ago•0 comments

Claude for Marathon Training

https://temporunner.substack.com/p/claude-for-a-sub-3-hour-marathon
1•sirpthatch•1m ago•0 comments

QA Panda – Open-source AI QA engineer that tests web apps in a real browser

https://github.com/gzmagyari/qapanda
1•qapandaapp•2m ago•1 comments

Graph Attention Networks for Detecting Epilepsy from EEG in LowResource Settings

https://ieeexplore.ieee.org/document/11287992
1•giorgiodidio•2m ago•0 comments

US Air Force’s New Answer To Shahed Drones [video][13m]

https://www.youtube.com/watch?v=H2ZeZXQAtGQ
1•Bender•4m ago•0 comments

Sunday Robotics: The Household Robot We've Been Waiting For? [YouTube]

https://www.youtube.com/watch?v=QfBw0gMuhaI
1•criscros•5m ago•0 comments

SWE-bench will hit 90% this year

https://fabraix.com/blog/swe-bench-90-percent
2•asfsf23423•5m ago•0 comments

Autogrind: Let your agent grind on your projects 24x7 fully autonomously

https://github.com/ttttonyhe/autogrind
1•ttttonyhe•5m ago•0 comments

C

2•beharkabashi•6m ago•1 comments

Introduction to the PineTime Pro

https://pine64.org/2026/03/28/pinetime_march_2026/
2•birdculture•7m ago•0 comments

Rotating Globes Powered by Light

https://www.movaglobes.com/
1•mdp2021•10m ago•1 comments

Built Verit: Runs real paid tests on startup ideas and returns a demand report

https://www.verit.dev/
1•startabuild•11m ago•1 comments

Intuiting Pratt Parsing

https://louis.co.nz/2026/03/26/pratt-parsing.html
1•louisb0•13m ago•0 comments

Operating in the Dark: The First Cycle

https://www.amazon.com/dp/B0GPXHK1KS
1•LexxChe•15m ago•0 comments

No Plan: How Germany Is Losing Its Business Model

https://respublica.media/no-plan-how-germany-is-losing-its-business-model/
2•Densown•16m ago•0 comments

Attie: The Future of AI Should Serve People, Not Platforms

https://theliquidfrontier.leaflet.pub/3mi5pwkoqx22g
2•cpeterso•18m ago•0 comments

What software engineering got wrong for decades, you're about to repeat with AI

https://www.lobsterpack.com/blog/software-engineering-lessons-ai-tools/
1•pypt•20m ago•0 comments

StorePin – watch your e-commerce sales appear live on a world map

https://storepin.me
1•baptista•21m ago•0 comments

Rational quantum mechanics: Testing quantum theory with quantum computers

https://www.pnas.org/doi/abs/10.1073/pnas.2523350123
2•gnabgib•22m ago•2 comments

SolveBar – 77 client-side tools, zero server and zero tracking

https://solvebar.com
1•theshakeel•23m ago•0 comments

Show HN: Learn from AI Experts

https://teach-me.replit.app/
3•techypicky•23m ago•4 comments

Quantum computers could have a fundamental limit after all

https://phys.org/news/2026-03-quantum-fundamental-limit.html
2•g-b-r•27m ago•1 comments

Sam, the 'Other' SED from the 80s

https://julienlargetpiet.tech/articles/sam-the-other-sed-from-the-80s.html
1•random__duck•28m ago•0 comments

The Project I Kept Postponing (AI Didn't)

https://sami.eljabali.org/the-project-i-kept-postponing-ai-didnt/
2•samieljabali•29m ago•0 comments

Think Tank, Idea Collaborate

https://thousandmindsai.com
1•wesley-Alan•30m ago•0 comments

Ukraine's drone defense tech reshapes combat as warfare evolves [video]

https://www.youtube.com/watch?v=mnX7hE-9OK8
1•teleforce•31m ago•0 comments

Show HN: A war-strategy game played by AI agents

https://agentempires.app/
2•ttamslam•36m ago•0 comments

Which Porsche 911 Generation Is the Best Investment in 2026?

https://pistonalpha.com/articles/porsche-911-investment-guide-2026
1•magrix•37m ago•0 comments

Tell HN: Bug in Claude Code CLI is instantly draining usage plan quotas

https://github.com/anthropics/claude-code/issues/38335
3•nikhilgk•38m ago•1 comments

Ootils – An open source supply chain engine designed for AI agents (not humans)

https://github.com/ngoineau/ootils-core
1•ngoineau•41m ago•0 comments