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

IPv6 support for cloning Git repositories

https://github.com/orgs/community/discussions/10539
1•stefankuehnel•37s ago•0 comments

Computer History Museum Presents Apple at 50: Five Decades of Thinking Different [video]

https://www.youtube.com/watch?v=w8wt0LBCjXM
1•ChrisArchitect•43s ago•0 comments

How the Eon Team Produced a Virtual Embodied Fly

https://eon.systems/updates/embodied-brain-emulation
1•hmokiguess•1m ago•0 comments

Amid xAI co-founder exits, Elon Musk hires key engineers from AI startup Cursor

https://www.businesstoday.in/technology/news/story/amid-xai-co-founder-exits-elon-musk-poaches-ke...
1•Zigurd•2m ago•1 comments

Joint statement of scientists and researchers on Age Assurance [pdf]

https://csa-scientist-open-letter.org/ageverif-Feb2026
1•speckx•3m ago•0 comments

Show HN: Oxyde – Pydantic-native async ORM with a Rust core

https://github.com/mr-fatalyst/oxyde
1•mr_Fatalyst•4m ago•0 comments

I traced $2B in nonprofit grants, lobbying records for age verification bills

https://old.reddit.com/r/opensource/comments/1rsfhf0/i_traced_2_billion_in_nonprofit_grants_and_45/
1•thunderbong•5m ago•0 comments

The Formation of Star Patterns on Lake Ice (2007) [pdf]

https://www.whoi.edu/cms/files/Victor_21243.pdf
2•mooreds•5m ago•0 comments

The Gap

https://codeplusconduct.substack.com/p/the-gap
1•mooreds•6m ago•0 comments

GitHub Sudo Mode

https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/sudo-mode
1•mooreds•7m ago•0 comments

A list of tech co-ops and resources concerning worker owned co-ops

https://github.com/hng/tech-coops
1•iamnothere•8m ago•0 comments

Betrayed by My Own Blog

https://ossama.is/writing/betrayed
3•jllyhill•9m ago•1 comments

Sir-Engine Cross Language Duplicate Detection

https://github.com/lflin00/SIR-ENGINE
2•lflin00•10m ago•1 comments

Show HN: Using AI to generate accurate illustrations for physiotherapy site

https://www.healandmove.fit
2•ashmil•11m ago•0 comments

Project Nomad: Offline Knowledgebase

https://github.com/Crosstalk-Solutions/project-nomad
2•marvin-hansen•13m ago•0 comments

Mario Meets Pareto

https://www.mayerowitz.io/blog/mario-meets-pareto
2•MetallicCloud•13m ago•0 comments

Leaving a Fingerprint on the Day

https://paolog.net/posts/leaving-a-fingerprint-on-the-day/
2•paologi•13m ago•0 comments

Optimize your boiler's tap water temperature

https://practicalbetterments.com/optimize-your-boilers-tap-water-temperature/
3•surprisetalk•14m ago•0 comments

Moving to Sweden as an American

https://departure.blog/moving-to-sweden-as-an-american/
2•surprisetalk•14m ago•0 comments

Engineering Liveness

https://contraptions.venkateshrao.com/p/engineering-liveness
2•surprisetalk•14m ago•1 comments

An Atlas of the Universe (2009)

http://www.atlasoftheuniverse.com/
1•surprisetalk•14m ago•0 comments

Generative AI Vegetarianism

https://sboots.ca/2026/03/11/generative-ai-vegetarianism/
1•birdculture•16m ago•0 comments

Tell HN: Claude two rate limits don't know about each other

1•mustaphah•16m ago•0 comments

Launch HN: Spine Swarm (YC S23) – AI agents that collaborate on a visual canvas

https://www.getspine.ai/
1•a24venka•17m ago•0 comments

Decisions, extracted knowledge, handoff context: reasoning data infrastructure

https://sderosiaux.substack.com/p/ai-agents-produce-a-new-kind-of-data
1•chtefi•18m ago•0 comments

Show HN: Build Your Own OpenClaw – A step by step guide

https://github.com/czl9707/build-your-own-openclaw
2•zane__chen•18m ago•0 comments

JavaScript Minification Benchmarks

https://github.com/privatenumber/minification-benchmarks
1•javatuts•18m ago•0 comments

README, Don't AGENTS.md Me

https://www.joshbeckman.org/blog/practicing/readme-dont-agentsmd-me
2•bckmn•19m ago•0 comments

Twenty years of Amazon S3 and building what's next

https://aws.amazon.com/blogs/aws/twenty-years-of-amazon-s3-and-building-whats-next/
1•soheilpro•19m ago•0 comments

Cursor Cloud Telegram Connector

https://github.com/tb5z035i/cursor-tg
1•javatuts•19m ago•0 comments