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

Digg: A Hard Reset, and What Comes Next

https://digg.com/
1•pavel_lishin•55s ago•0 comments

Florida's New "Thought Police" Bill Is Real (HB 945) [video]

https://www.youtube.com/watch?v=9wjnBWnL8bM
1•hrimfaxi•1m ago•1 comments

AI engineer uses ChatGPT+AlphaFold to develop cancer vaccine for his dog

https://www.theaustralian.com.au/business/technology/tech-boss-uses-ai-and-chatgpt-to-create-canc...
2•bensandcastle•3m ago•1 comments

Right to Compute Act (NH HB1124)

https://legiscan.com/NH/text/HB1124/id/3286560
1•maxwell•5m ago•0 comments

GitHub infuriates students by removing some models from free Copilot plan

https://www.theregister.com/2026/03/13/microsoft_github_removes_models_student_plan/
2•raybb•8m ago•0 comments

Who Goes Nazi? (1941)

https://harpers.org/archive/1941/08/who-goes-nazi/
2•Anon84•8m ago•0 comments

Reverse-engineering Claude's generative UI – then building it for the terminal

https://michaellivs.com/blog/reverse-engineering-claude-generative-ui/
1•gmays•9m ago•0 comments

coming soon: fashion critique newsletter

https://igasped.substack.com/about
1•kholiflower•11m ago•1 comments

Show HN: I save £300/mo by auto-scaling my staging cluster at night

https://github.com/tiny-systems/desktop-client
1•gtpoxa•11m ago•0 comments

Claude Visual and Interactive Content

https://support.claude.com/en/articles/13641943-visual-and-interactive-content
1•droidjj•12m ago•0 comments

Accidental complexity, essential complexity, and Kubernetes (2022)

https://jamsocket.com/blog/complexity-kubernetes
1•Tomte•14m ago•0 comments

US Gas spending increase since Feb 28

https://gas-cost-of-iran-war.netlify.app/
1•loss_flow•15m ago•2 comments

Show HN: DJX – Convention over Configuration for Django (Rails-Inspired CLI)

2•RedsonNgwira•15m ago•0 comments

Waller: A game teaching the fundamentals of drystone walling

https://www.orthodoxmasonry.com/waller
2•CGMthrowaway•16m ago•0 comments

How do you capture WHY engineering decisions were made, not just what?

6•zain__t•18m ago•6 comments

Hawkeye – open-source flight recorder

2•mklamine•19m ago•1 comments

Another AT&T FirstNet user gets $6,200 bill, at $2 per megabyte

https://arstechnica.com/tech-policy/2026/03/att-wrongly-charged-man-6196-reversed-bill-after-hear...
3•mounram•20m ago•0 comments

Datacenters are becoming a target in warfare for the first time

https://www.theguardian.com/technology/2026/mar/10/datacenters-target-warfare-iran
3•mizzao•21m ago•0 comments

Amazon customers hate Alexa's new, adults-only 'Sassy' voice: 'Unplug'

https://nypost.com/2026/03/13/tech/amazon-customers-hate-alexas-new-adults-only-sassy-voice/
3•1vuio0pswjnm7•22m ago•0 comments

Learn Haskell in Two Weeks

https://vitez.me/learn-haskell-in-two-weeks
1•mitchellvitez•23m ago•0 comments

How Google is reimagining Maps with Gemini

https://blog.google/products-and-platforms/products/maps/ask-maps-immersive-navigation/
3•gmays•23m ago•0 comments

There's a Class 100 semiconductor cleanroom inside this backyard shed [video]

https://www.youtube.com/watch?v=HfSO-LCKmrA
1•bwidlar•24m ago•0 comments

Adobe settles DOJ cancellation fee lawsuit, will pay $75M penalty

https://arstechnica.com/gadgets/2026/03/adobe-settles-doj-cancellation-fee-lawsuit-will-pay-75-mi...
1•mounram•25m ago•0 comments

Lightweight Kanban board for Claude Code

https://runnrr.io/landing
1•dvitjazevs•26m ago•1 comments

After Amazon's Alexa asks creepy questions to tot, Mom pulls plug

https://nypost.com/2026/03/11/lifestyle/amazons-alexa-asked-my-4-year-old-girl-this-creepy-questi...
2•1vuio0pswjnm7•27m ago•0 comments

Three-Dimensional Bioprinting and Rose-Inspired Medical Applications

https://www.mdpi.com/2313-7673/11/3/164
1•PaulHoule•28m ago•0 comments

Analysis of hydrogen production costs by various methods (2022)

https://www.sciencedirect.com/science/article/pii/S2666790822001574
2•zahlman•28m ago•1 comments

Show HN: Interview scoring app because our feedback was just Slack vibes

https://techscore.dev/
1•xaviair•30m ago•0 comments

The wild six weeks for NanoClaw's creator that led to a deal with Docker

https://techcrunch.com/2026/03/13/the-wild-six-weeks-for-nanoclaws-creator-that-led-to-a-deal-wit...
22•wateroo•31m ago•0 comments

Kalverion_bot a.k.a. AI-bot v1.1.0 release. Overdraft protection

https://github.com/bisbeebucky/ai-bot
1•bisbeebucky•34m ago•0 comments