frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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

Code Is Cheap(er)

https://htmx.org/essays/code-is-cheap/
1•chr15m•34s ago•0 comments

Strain-resilient intrinsically stretchable electrochemical biointerfaces

https://www.science.org/doi/10.1126/science.aed1630
1•OneManHorde•12m ago•1 comments

BunsenLabs Linux Carbon

https://www.bunsenlabs.org/
1•doener•12m ago•0 comments

Human-Like Neural Nets by Catapulting

https://gwern.net/llm-catapult
2•telotortium•13m ago•0 comments

Gnome File Previewer Switches to GTK4, Adds Dark Mode

https://www.phoronix.com/news/GNOME-File-Previewer-GTK4
2•daesorin•15m ago•0 comments

Cursor cuts prices, adds enterprise spend controls amid "tokenomics" reckoning

https://thenewstack.io/cursor-pricing-token-billing/
2•AnhTho_FR•19m ago•0 comments

This 71-year-old jockey has saddled up in more than 53,000 races

https://www.cnn.com/2026/06/05/sport/perry-ouzts-jockey
1•breve•20m ago•0 comments

Ask HN: How do you manage distribution after building?

1•lucasacosta_•20m ago•0 comments

DoD Officially Drops 180 Faiths from Military's Recognized Religion List

https://www.military.com/dod-officially-drops-180-faiths-from-militarys-recognized-religion-list
13•Balgair•21m ago•4 comments

Telegram's Plan to Break the Apple-Google-Meta Monopoly Runs Through Wall Street

https://www.disruptionbanking.com/2026/06/05/telegrams-kremlin-approved-plan-to-break-the-apple-g...
2•bmcdresson•27m ago•1 comments

Missing American student found dead in Japan after dayslong search

https://www.cnn.com/2026/06/06/us/james-weston-higginbotham-found-dead
1•andy99•30m ago•0 comments

Ergonomic Overrides for Nixpkgs

https://haskellforall.com/2026/06/ergonomic-overrides-for-nixpkgs
1•birdculture•31m ago•0 comments

You can't detect your way out of catastrophic LLM failure

https://github.com/joseteiadirector/teia-igo-vs-claude-opus-4.8/blob/main/README.en.md
1•joseteia26•34m ago•0 comments

Show HN: VaultSQL – Open-Source Zero-Trust SQL Workbench

https://vaultsql.com/
1•antileet•34m ago•0 comments

EU's tech sovereignty package includes 29 pages on Open Source, says OSI

https://news.slashdot.org/story/26/06/06/0618217/eus-tech-sovereignty-package-includes-29-pages-o...
2•MilnerRoute•34m ago•0 comments

Praggnanandhaa takes Norway Chess title after scorig four wins in a row

https://en.chessbase.com/post/norway-chess-2026-10
1•qainsights•35m ago•1 comments

Show HN: Ironwall, a safety-first native programming language and compiler

5•bOZbfU4YdRnJQ•37m ago•1 comments

Context Sculpting

https://perceptiontheory.bearblog.dev/context-sculpting/
3•perceptronblues•39m ago•0 comments

How to try out over 85 Linux distros, no installation required – with DistroSea

https://www.zdnet.com/article/try-dozens-of-linux-distros-no-installation-distrosea/
2•doener•40m ago•0 comments

Python Populous: A Populous (Amiga) Clone Developed in Python Using Pygame

https://github.com/powerpsy/python-populous
1•doener•41m ago•0 comments

Hamyoungwook

https://drive.google.com/file/d/1vUeOrzJhXwX1eZ1URNCmBEojnQ3AvWJ8/view?usp=drive_link
1•Hamyoungwook•42m ago•0 comments

AI Can now control your desktop

https://clawdcursor.com
1•AmDab•44m ago•0 comments

Show HN: Note management app that sorts and files stuff for the user

https://notaru.ai
3•alpadurza•44m ago•0 comments

GitHub Copilot: GPT-5.2 and GPT-5.2-Codex deprecated

https://github.blog/changelog/2026-06-05-gpt-5-2-and-gpt-5-2-codex-deprecated/
2•zorrn•46m ago•0 comments

How to Monitor Any USB Audio or Video Device on macOS

https://chris786525.substack.com/p/how-to-monitor-any-usb-audio-or-video
1•docjojo•46m ago•0 comments

Show HN: Aquifer – an MCP runtime for spiky agent tool traffic

https://github.com/rjpruitt16/aquifer
1•rjpruitt16•50m ago•0 comments

Show HN: Keybench – Scriptable, extensible performance tool for key value stores

https://github.com/guycipher/keybench
2•alexpadula•53m ago•0 comments

No Babies? Blame Capitalism

https://jacobin.com/2026/06/birth-rates-capitalism-socialism-germany
19•thisislife2•54m ago•22 comments

Life is too short for a slow terminal

https://mijndertstuij.nl/posts/life-is-too-short-for-a-slow-terminal/
2•ingve•57m ago•0 comments

Why Aren't We Measuring How AI Affects Humans?

https://spectrum.ieee.org/measuring-ai-societal-impact-khan
4•pseudolus•1h ago•0 comments