frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Hundred Rabbits

https://en.wikipedia.org/wiki/Hundred_Rabbits
1•quijoteuniv•1m ago•0 comments

Critical Vulnerability with CPanel and WHM Login Authentication

https://support.cpanel.net/hc/en-us/articles/40073787579671-Critical-Vulnerability-with-cPanel-WH...
1•ollybee•1m ago•0 comments

AI Wellbeing: Measuring and improving the functional pleasure and pain of AIs

https://www.ai-wellbeing.org/
1•anematode•3m ago•0 comments

Walmart Upstream Facility Services: What We Do

https://public.walmart.com/content/wp/upstream-home/WhatWeDo.html
1•petethomas•4m ago•0 comments

Donating Agent Payments Protocol to the Fido Alliance

https://blog.google/products-and-platforms/platforms/google-pay/agent-payments-protocol-fido-alli...
1•pentagrama•4m ago•0 comments

Preparing for the AI-Enhanced Attacker and the Impact on CISOs

https://www.armadin.com/blog-posts/prepare-for-the-ai-enhanced-attacker
1•wslh•6m ago•0 comments

Does it work, or does it keep working?

https://shippingbytes.com/2026/04/22/does-it-work-or-does-it-keep-working/
2•gianarb•7m ago•0 comments

Anglo-Persian Oil Company

https://en.wikipedia.org/wiki/Anglo-Persian_Oil_Company
2•notepad0x90•7m ago•0 comments

MeetingEscape – vibe-coded panic button for escaping meetings

https://meetingescape.net/
1•Enginehead_•7m ago•0 comments

Confectionary Satellites

https://zenodo.org/records/19799778
1•svnt•8m ago•0 comments

Denuvo has been cracked in all single-player games it previously protected

https://www.tomshardware.com/video-games/pc-gaming/denuvo-has-been-bypassed-in-all-single-player-...
2•oceansky•9m ago•0 comments

Vompeccc from Scratch: Picking Produce with ICR in Emacs

https://www.chiply.dev/post-vompeccc-fruits
1•chiply•9m ago•1 comments

Router has been narrating your browsing habits this whole time

https://www.makeuseof.com/your-isp-watching-your-browsing-whole-time-heres-windows-11-fix/
1•galaxyLogic•11m ago•0 comments

CATL secures 60 GWh sodium-ion battery order with Hyperstrong

https://www.pv-magazine.com/2026/04/28/catl-secures-worlds-largest-sodium-ion-battery-order-with-...
3•konschubert•12m ago•1 comments

How well does S3 checkpointing hold up when running Airflow on spot?

https://spot.rackspace.com/blog/building-fault-tolerant-airflow-pipelines-on-spot-infrastructure
1•aleroawani•13m ago•1 comments

Why the Chicken Crossed the Road, According to Various Entities

https://dynomight.net/chicken/
1•webninja•14m ago•0 comments

First Amendment advocates blast the FCC's early review of ABC broadcast licenses

https://www.nbcnews.com/news/us-news/first-amendment-advocates-blast-fccs-early-review-abc-broadc...
3•ceejayoz•14m ago•0 comments

AMD's Lemonade SDK 10.3 Now 10x Smaller by Getting Rid of Electron

https://www.phoronix.com/news/AMD-Lemonade-10.3
3•canucker2016•14m ago•1 comments

Ask HN: What happens when you paste a screenshot, and ask questions in LLM?

1•orsenthil•15m ago•2 comments

Building simulations and/or digital twins with AI

https://github.com/plugboard-dev/plugboard
1•tjc45•17m ago•1 comments

Show HN: PeopleMesh, Semantic Search for People

https://github.com/francescopace/peoplemesh
1•francescopace•20m ago•0 comments

BP profits more than double as Iran war sends oil prices higher

https://www.bbc.com/news/articles/c2eveyvgn9no
18•breve•27m ago•2 comments

Trillions per Second

https://github.com/c4chaos-io/trillions-per-second
1•kordlessagain•28m ago•1 comments

Japan Airlines trials humanoid robots as ground handlers

https://www.bbc.com/news/articles/cpwp87j1llvo
2•breve•31m ago•0 comments

FDA turns up heat on Amgen, proposing to rescind approval of Tavneos

https://www.fiercepharma.com/pharma/fda-puts-more-heat-amgen-proposing-rescind-approval-tavneos
1•randycupertino•31m ago•1 comments

Reviving Teletext for Ham Radio

https://spectrum.ieee.org/reviving-teletext-for-ham-radio
1•austinallegro•31m ago•0 comments

How electronic warfare is sowing confusion in cockpits

https://www.cnn.com/2026/04/28/science/gps-jamming-plane-navigation-problems
2•breve•33m ago•0 comments

Lore – A Chrome extension that passively saves the articles you read

https://lore-a0x.pages.dev
1•Jordanhydn•34m ago•0 comments

Unfounded Health Concerns Are Powering a Solar Backlash

https://www.propublica.org/article/michigan-solar-farms-health-concerns-st-clair-county
2•mikhael•36m ago•1 comments

A way out of US debt?

https://www.warman.life/blog/2026-04-26-the-synthetic-buyer/
3•shaunistyping•37m ago•1 comments