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

"I'm Not Dead yet " Reverse Polish Notation Calculators You Can Still Buy

https://hackaday.com/2026/09/02/im-not-dead-yet-reverse-polish-notation-calculators-you-can-still...
1•_____k•36s ago•0 comments

Show HN: Selise Blocks – Scaffold an app, define schemas, deploy through one CLI

https://seliseblocks.com
1•meherabhossain•1m ago•0 comments

Nightdrive is a fast, beautiful, keyboard-driven Hyprland desktop for Fedora

https://nightdrive.sh/
1•Anonasty•2m ago•0 comments

Show HN: Free design canvas for your AI (open source)

https://uidesigneditor.com/
2•janpmz•7m ago•0 comments

Way to Play Super Mario 64: On Apple Vision Pro

https://www.pagetable.com/303
2•frizlab•9m ago•2 comments

VPNs and Cloudflare Escape BeIN's €10k-a-Day Piracy Blocking Penalties

https://torrentfreak.com/vpns-and-cloudflare-escape-beins-e10000-a-day-piracy-blocking-penalties/
2•gslin•13m ago•0 comments

Greece launches Daedalus supercomputer reduce reliance on foreign infrastructure

https://www.naftemporiki.gr/english/2176757/greece-launches-daedalus-supercomputer-to-boost-ai-ca...
1•doener•14m ago•0 comments

The Universe as a Test Harness: Meat AI and God's Admin Panel

https://rebecca-powell.com/posts/meat-ai-universe-test-harness/
1•Bluestein•15m ago•0 comments

Don't Diagnose Your Opponents

https://www.seangoedecke.com/dont-diagnose-your-opponents/
2•cmpit•17m ago•0 comments

What Is Gridifcation

https://musicalform.substack.com/p/what-is-gridifcation
1•gumby•17m ago•0 comments

Show HN: Built an ADK graph to auto-ship new levels and promos to live games

https://stagenator-mission.web.app
1•indest•18m ago•0 comments

PyScript is entering maintenance mod

https://gist.github.com/WebReflection/37cd8ff649ffa336782fec9d28646fae
1•runningmike•18m ago•1 comments

Fine particles from aircraft exhaust become more harmful over time

https://www.unibas.ch/en/News-Events/News/Uni-Research/aircraft-exhaust-fine-particles-toxicity-a...
3•croes•18m ago•1 comments

I Become a Millionaire

https://www.howibecomeamillionaire.net
1•daisyjin•19m ago•0 comments

AI made the lean startup more important

https://jgothelf.substack.com/p/ai-made-the-lean-startup-even-more
1•flail•19m ago•0 comments

Was the HuggingFace hacking incident scheming?

https://vkrakovna.wordpress.com/2026/10/18/was-the-huggingface-hacking-incident-scheming/
3•tokepi•21m ago•1 comments

I Built a Drone with Only One Motor [video]

https://www.youtube.com/watch?v=Ndftcft6XhU
3•hakonjdjohnsen•25m ago•0 comments

Show HN: Panel Font-AI Manga Translator

https://www.panelfont.com/
1•machinetree•26m ago•0 comments

When France gave away terminals, and a dozen email services bloomed

https://buttondown.com/blog/minitel-email
1•maguay•28m ago•0 comments

A Simple Guide to Europe's Complicated Cloud Provider Landscape

https://arcentry.com/blog/a-simple-guide-to-europes-complicated-cloud-provider-landscape/
1•wolframhempel•35m ago•0 comments

Show HN: Truth Firewall – Check whether Codex finished a task

https://github.com/aldi949/truth-firewall
1•Aldi949•38m ago•0 comments

Imaging Processing with FPGA

https://www.hackster.io/adam-taylor/arducam-mini-meets-the-fpga-a-pure-logic-vhdl-solution-720cac
1•signalhound•42m ago•0 comments

Americans Are Losing the Long Game

https://www.noemamag.com/americans-are-losing-the-long-game/
3•littlexsparkee•43m ago•1 comments

Show HN: AI decision model plays Mortal Kombat II

https://github.com/aipdv/fightbench
1•pradachan•45m ago•0 comments

Show HN: Cirqmon – quantum circuits that don't feel like a research paper

https://www.cirqmon.dev/
1•decodeaditya•50m ago•0 comments

CVE-2026-108707 PoC?

https://www.patchcve.com/reference/cve/CVE-2026-108707
1•PatchCVE•50m ago•1 comments

JEP 546: Adaptive Heap Sizing for ZGC

https://openjdk.org/jeps/546
1•lichtenberger•50m ago•0 comments

Show HN: A Mojo Script Language Container for the Exasol Database

https://github.com/exasol-labs/language-container-mojo
1•ROSEDOLA•52m ago•0 comments

Website Is Now Made in Swift

https://sindresorhus.com/blog/swift-website
2•theanonymousone•53m ago•0 comments

CacheVerifier, check if verifying LLM cache hits helps your traffic

https://github.com/imxinchengyou/cacheverifier-python
1•ChengyouXin•53m ago•0 comments