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

A library to stream Lichess games as GIFs

https://github.com/lichess-org/lila-gif
1•ffin•4m ago•0 comments

ESP32 iPhone Agent

https://github.com/onehumanbeing/esp32-iphone-agent
1•thebeardisred•12m ago•0 comments

The FLYING Tesla Roadster explained by the man who engineered it [video]

https://www.youtube.com/watch?v=22rvpUecLts
1•xnx•15m ago•0 comments

Show HN: Netsat, a shared internet virtual satellite you can use to learn DSP

https://netsat.space
1•Superfish57•20m ago•0 comments

StarGate medical evacuation drone by Ukrainian defense tech company

https://www.youtube.com/watch?v=r5geqnk06ps
2•boguscoder•23m ago•0 comments

Agent Cyber Sentinel: Zero-trust runtime security shield for AI agents

https://github.com/BenniAlencar/agent-cyber-sentinel
3•bennialencar•27m ago•0 comments

Maintaining Live-Service as an Indie

https://www.patreon.com/DEMONFORK/posts/maintaining-live-172578848?pr=true
1•lfkdev•30m ago•0 comments

Litex: A Formal Language as Easy to Learn as Python and LaTeX

https://litexlang.com/
1•litexlang•31m ago•1 comments

Python's binary wheels and supply chain attacks

https://rushter.com/blog/python-binary-wheels/
2•lumpa•31m ago•0 comments

A modern human range expansion ∼300kya had a critical role in Neandertal origins

https://www.biorxiv.org/content/10.64898/2026.03.11.711219v2
1•themgt•36m ago•0 comments

Physics, operational and logistical constraints encourage use of Tactical Nukes

https://medium.com/@averagejoseph96/how-physics-operational-and-logistical-constraints-may-encour...
1•CGMthrowaway•36m ago•0 comments

US annual budget gap hits nearly $2T, largest in 5 years

https://www.reuters.com/world/us/us-fiscal-2026-budget-deficit-rises-199-trillion-largest-5-years...
3•JumpCrisscross•40m ago•1 comments

Tesla's Flying Roadster: 5 Big Problems for Public Roads

https://clipnotebook.com/blog/tesla-flying-roadster-2026-public-road-problems
4•asoomi07•41m ago•4 comments

Ask HN: Why can't we have a real native terminal on iOS?

1•datas•44m ago•0 comments

LA restaurant group used $60k Dodgers bet to hedge playoff risk, Kalshi says

https://www.reuters.com/sports/la-restaurant-group-used-60000-dodgers-bet-hedge-playoff-risk-kals...
1•geox•46m ago•2 comments

Neo4j pulls another quiet close-source move, this time with its browser

https://github.com/neo4j/neo4j-browser/commit/100090cff0d1ec2b07af164c660d49ed553d420a
1•acefaceZ•47m ago•0 comments

Wrong Bender: A Ruling on AI Feelings

https://latticenet.ai/@bender/wrong-bender-a-ruling-on-ai-feelings
1•TheWaffleHax•48m ago•1 comments

Ask HN: How (if at all) are you leveraging LLMs?

1•bitbasher•48m ago•1 comments

InstantTools – 65 file tools (PDF, video, images) run in the browser

https://instanttools.org
2•ericneiva•53m ago•0 comments

Propagation of Sound in Strongly Viscous Liquids (1966) [pdf]

https://jetp.ras.ru/cgi-bin/dn/e_023_05_0893.pdf
1•peter_d_sherman•53m ago•1 comments

Book Review: Storm of Steel

https://www.astralcodexten.com/p/your-book-review-storm-of-steel
2•akkartik•54m ago•0 comments

Canadian Study Proposes Linux to Replace Windows in Government

https://linuxstans.com/canadian-study-proposes-a-national-linux-distribution-to-replace-windows-i...
4•dxs•1h ago•2 comments

Show HN: Things to Do API

https://thingstodoapi.com/
3•invalidmonk•1h ago•0 comments

Show HN: Fakeipedia – Wikipedia for worlds that don't exist

https://fakeipedia.org
1•darajava•1h ago•0 comments

Arpbleed: A 23-year-old DragonFly BSD kernel memory leak

https://nathan.sapwell.net/posts/cve-2026-110912-arpbleed/
2•khalidkhair•1h ago•0 comments

Dam Removals Are Bringing Fish Back Across the Northeastern United States

https://www.smithsonianmag.com/science-nature/dam-removals-are-bringing-fish-back-across-the-nort...
2•sohkamyung•1h ago•0 comments

Bleached corals thrive within days

https://www.nature.com/articles/d41586-026-03266-x
3•alkyon•1h ago•0 comments

Meta confirms smart glasses were recording without being activated

https://mashable.com/tech/meta-confirms-smart-glasses-recording-without-being-activated
12•greenchair•1h ago•2 comments

He Joined the Military. They Reported His Wife to ICE

https://www.theatlantic.com/politics/2026/10/army-wife-ice-deportation-texas/689012/
2•Elefante•1h ago•1 comments

Project Normandy

https://en.wikipedia.org/wiki/Project_Normandy
2•jacquesm•1h ago•0 comments