frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Xtd: Modern C++20 framework (CLI, GUI, unit tests)

https://gammasoft71.github.io/xtd/
1•dmacvicar•1m ago•0 comments

Genesis Mission: A National Mission to Accelerate Science Through AI

https://genesis.energy.gov/
1•donutloop•1m ago•0 comments

Online Tools Aggregator

https://www.tools-best.com/
1•levigrace•1m ago•1 comments

Show HN: White-Box-Coder – AI that self-reviews and fixes its own code"

https://github.com/EMMA019/WHITE-BOX-CODER
1•tarocha1019•2m ago•0 comments

Greek Cybercrime Unit Shuts Down IPTV Pirates, 68 End Users Face Fines

https://torrentfreak.com/cybercrime-unit-shuts-down-iptv-pirates-68-end-users-face-fines-251126/
1•gslin•2m ago•0 comments

Tailwind - How I think about CSS authorship in 2025

https://wlls.dev/blog/on-tailwind
1•devalexwells•3m ago•0 comments

Antimatter Development Program – Casey Handmer's Blog

https://caseyhandmer.wordpress.com/2025/11/26/antimatter-development-program/
1•bilsbie•4m ago•0 comments

EU approves Chat Control policy

https://www.techradar.com/vpn/vpn-privacy-security/chat-control-eu-lawmakers-finally-agree-on-the...
7•mseri•7m ago•0 comments

Juno Neutrino Observatory Releases First Results

https://www.scientificamerican.com/article/juno-neutrino-observatory-releases-first-results/
4•quapster•10m ago•0 comments

Brain Has a Built-In Isolation Mode

https://neurosciencenews.com/neuroscience-sickness-isolation-29979/
3•gmays•12m ago•0 comments

WeDo: Collaborative gift registry that solves the holiday coordination headache

https://www.wedoto.day
2•tmanderson•17m ago•1 comments

Prepared Statements? Prepared to Be Vulnerable

https://blog.mantrainfosec.com/blog/18/prepared-statements-prepared-to-be-vulnerable
2•eqarmada2•19m ago•1 comments

The Cause of Cultural Stagnation

https://www.slowboring.com/p/the-hidden-cause-of-cultural-stagnation
2•noisymortimer•19m ago•0 comments

David Lerner, cofounder of Tekserve, has died

https://www.nytimes.com/2025/11/26/technology/personaltech/david-lerner-dead.html
3•NaOH•20m ago•1 comments

PyOpenSci Python Package Guide

https://www.pyopensci.org/python-package-guide/index.html
2•runningmike•21m ago•1 comments

Human brains have 5 distinct 'epochs' in a lifetime

https://www.nbcnews.com/science/science-news/human-brains-5-epochs-development-rcna245663
2•gmays•22m ago•0 comments

Vocabulary development in autistic children: a network growth analysis

https://acamh.onlinelibrary.wiley.com/doi/10.1111/jcpp.70076
2•wjb3•26m ago•0 comments

Academic assassinations are a threat to global science

https://physicsworld.com/a/academic-assassinations-are-a-threat-to-global-science/
3•doetoe•27m ago•0 comments

Worktrunk: Git worktree manager, designed for parallel agents, written in Rust

https://github.com/max-sixty/worktrunk
2•maximilianroos•29m ago•0 comments

Show HN: I vibe-coded an ASCII Keyboard

https://asciikeyboard.app
2•levgel•29m ago•0 comments

Urgent ACPI Revert for Linux 6.18 to Deal with Some Hardware Crashing

https://www.phoronix.com/news/Urgent-ACPI-Revert-Linux-6.18
2•Bender•30m ago•0 comments

The EU made Apple adopt new Wi-Fi standards, and now Android can support AirDrop

https://arstechnica.com/gadgets/2025/11/the-eu-made-apple-adopt-new-wi-fi-standards-and-now-andro...
54•cyclecount•33m ago•10 comments

AirDrop support for Pixel 10 likely exists because of the EU ruling

https://9to5google.com/2025/11/21/googles-airdrop-support-for-pixel-10-likely-exists-because-of-t...
22•joejohnson•35m ago•1 comments

Ask HN: Why aren't more startups using .NET?

3•mafiaa•38m ago•4 comments

Global carbon emissions will soon flatten or decline

https://www.science.org/content/article/global-carbon-emissions-will-soon-flatten-or-decline
4•hmartiniano•38m ago•0 comments

Is Your Car Spying on You? Here's how

https://jeffreylminch.substack.com/p/is-your-car-spying-on-you
5•rmason•38m ago•0 comments

Magnetic Induction Heater Using Flywheel with Neodymium Magnets [video]

https://www.youtube.com/watch?v=jPlyGGVu38U
3•itronitron•39m ago•0 comments

A Distributed Inference Framework Enabling Running Models Exceeding Total Memory

https://github.com/firstbatchxyz/dnet
2•driaforall•40m ago•1 comments

Thousands of Secrets Leaked on Code Formatting Platforms

https://www.securityweek.com/thousands-of-secrets-leaked-on-code-formatting-platforms/
2•Bender•40m ago•0 comments

We Rewrote Our Startup from PHP to Gleam in 3 Weeks

https://www.radical-elements.com/minor-epiphanies/we-rewrote-our-startup-from-php-to-gleam-in-3-w...
2•birdculture•40m ago•0 comments