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

Discrete Dipole Approximation Code Ddscat 7.2 (2012)

https://arxiv.org/abs/1202.3424
1•doener•1m ago•0 comments

OpenSourceRail

https://github.com/modernecotech/OpenSourceRail/tree/main
1•modernecotech•3m ago•0 comments

ISAR Aerospace 5 Sept Mission Onward and Upward

https://isaraerospace.com/mission-updates-overview
1•t43562•5m ago•1 comments

Trump Officials Draft Plan to Pay At-Home Parents, Using Funds for Working Ones

https://www.nytimes.com/2026/09/05/us/politics/stay-at-home-parents-subsidies.html
1•koolba•6m ago•0 comments

Who Killed the American Demoscene? (2019)

https://www.vice.com/en/article/who-killed-the-american-demoscene-synchrony-demoparty/
2•wy35•8m ago•1 comments

Generating scenarios for extreme events, without extreme data

https://news.mit.edu/2026/generating-scenarios-extreme-events-without-extreme-data-0824
1•taubek•9m ago•0 comments

Daemoncore Academy Now 100% Free Cyber Security Certifications

https://www.daemoncore.app/
1•DaemonCoreApp•12m ago•0 comments

Ling 3.0 Tiny

https://huggingface.co/inclusionAI/Ling-3.0-tiny
1•AbuAssar•13m ago•0 comments

Ask HN: Did you see this Polymarket post on X today?

1•skwasimin•16m ago•1 comments

Show HN: ChatPanel Now Available on Firefox

https://chatpanel.net/
1•earth2mars•17m ago•1 comments

Eliza Effect

https://en.wikipedia.org/wiki/ELIZA_effect
2•tripdout•17m ago•1 comments

UN votes to adopt new map that makes our world look different

https://www.cnn.com/2026/09/04/world/un-vote-new-world-map-intl-scli
1•consumer451•19m ago•0 comments

Show HN: Claude Skill – Interns must review (your agent's design choices)

https://github.com/alpbahadur/interns-review-plugin
7•alpbahadur•19m ago•0 comments

Elon Musk's Inner Circle Is Pouring Cash into Making Psychedelics Mainstream

https://www.wsj.com/health/healthcare/elon-musks-inner-circle-is-pouring-cash-into-making-psyched...
2•gmays•20m ago•0 comments

Large language models can predict the results of social science experiments

https://www.nature.com/articles/s41586-026-10742-x
2•paulpauper•21m ago•0 comments

Our Likely Future Filter: World Govt

https://www.overcomingbias.com/p/most-likely-future-filter-world-govt
1•paulpauper•21m ago•0 comments

The Danube River's water is dropping so low that World War II ships are emerging

https://www.pbs.org/newshour/world/the-danube-rivers-water-is-dropping-so-low-that-world-war-ii-s...
1•throwaway2037•22m ago•0 comments

Anyone using llama.cpp willing to test LlamaRack?

https://github.com/brantje/LlamaRack
1•Vibecoder_•23m ago•1 comments

Share price numbers for the Hugging Face incident

https://marginalrevolution.com/marginalrevolution/2026/09/more-numbers-for-the-hugging-face-incid...
1•paulpauper•23m ago•0 comments

Benzi – A harness reading LESS source code to write better quality code

https://github.com/oooscoos/Benzi
1•kamarovmakarov•24m ago•1 comments

Phase Dynamics on a T 3-Manifols

https://zenodo.org/records/22377516
1•AevumOriens•28m ago•0 comments

Appreciate Creativity and Art

https://www.iznikcini.com/blogs/news/islamic-mosque-tiles-a-journey-through-art-and-history
2•mahirsaid•30m ago•0 comments

Ironies of Automation [pdf]

https://static1.squarespace.com/static/644321e78cd2dd37613af33e/t/6694873f71612132a84371c7/172100...
1•recursivedoubts•30m ago•1 comments

The moral panic over data centres is foolish

https://www.economist.com/leaders/2026/09/03/the-moral-panic-over-data-centres-is-foolish
39•andsoitis•31m ago•67 comments

Show HN: Red Hat build of Podman Desktop

https://developers.redhat.com/products/red-hat-build-podman-desktop
2•twelvenmonkeys•33m ago•1 comments

A single workout may help protect memory after a short night's sleep

https://medicalxpress.com/news/2026-09-workout-memory-short-night.html
1•mdp2021•33m ago•0 comments

Show HN: I made DeepSeek a stock prophet in the chat

https://chat.deepseek.com/share/najhhfle4n4e9brimh
1•SKYNET800•36m ago•0 comments

Knowing Where to Type 'Zero' (2015)

https://randomascii.wordpress.com/2015/01/19/knowing-where-to-type-zero/
2•birdculture•37m ago•0 comments

OpenAI agent swarm posted two FBI database API keys, and hit two universities

https://twitter.com/kennethrdegraff/status/2096028829890625978
2•ericzawo•39m ago•2 comments

Over 5,400 hacked sites serve ClickFix payloads stored on the blockchain

https://www.bleepingcomputer.com/news/security/over-5-400-hacked-sites-serve-clickfix-payloads-st...
1•sbulaev•40m ago•0 comments