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

Show HN: I turn Airtable exports into real Postgres schemas(FKs, not CSVs)

https://www.atmigrator.com
1•saud_c•58s ago•0 comments

ChatGPT-using lawyer punished for citing fake testimony from made-up witnesses

https://arstechnica.com/tech-policy/2026/09/chatgpt-using-lawyer-punished-for-citing-fake-testimo...
1•mdp2021•4m ago•0 comments

Ask HN: New way of organizing Mathematical Research

1•youoy•8m ago•0 comments

28 Years of Tara Books

https://tarabooks.com/blog/the-past-is-always-present/
1•vishnukvmd•11m ago•0 comments

TablePro: A native, open-source database client for macOS

https://github.com/TableProApp/TablePro
1•fourfire•12m ago•0 comments

Robust Solution of Laplacian Equations by Random Approx Cholesky Factorization

https://epubs.siam.org/doi/10.1137/24M1673577
1•musha68k•12m ago•0 comments

Schwung: Layer synths, effects, new tools on top of the Ableton Move

https://schwung.dev/
1•QuantumNomad_•13m ago•0 comments

This is really bad: AI Safety Threat

https://www.nytimes.com/2026/09/11/opinion/ai-safety-threat-technology.html
2•ryan_j_naughton•18m ago•1 comments

Rare Not Random Using Token Efficiency for Secrets Scanning

https://lookingatcomputer.substack.com/p/rare-not-random
1•boyter•19m ago•0 comments

Teaching an M4 CPU to Tell Stories with XOR, Popcount and SDOT

https://dnhkng.substack.com/p/teaching-an-m4-cpu-to-tell-stories
1•JPLeRouzic•21m ago•0 comments

A.I. Could Possibly End Humanity. How Are Humans Supposed to Process That?

https://www.nytimes.com/2026/09/10/science/ai-humanity-risk.html
1•doener•22m ago•0 comments

Artemis: Google's new AI agent framework for mobile test automation

https://github.com/google/artemis
2•soltanov•26m ago•0 comments

The Emperor's Old Clothes [pdf]

https://worrydream.com/refs/Hoare_1981_-_The_Emperors_Old_Clothes.pdf
3•pykello•28m ago•0 comments

Dissolving the Fermi Paradox (2018)

https://arxiv.org/abs/1806.02404
1•bumbledraven•35m ago•0 comments

Ask HN: Why are the tech companies tracking humans?

4•roschdal•38m ago•2 comments

City Layout Guessr Game

https://noahdarwinlee.com/citylayoutguessr/
2•noahdlee•40m ago•0 comments

Jetpack: Consensus Made Generally Fast (OSDI '26)

http://muratbuffalo.blogspot.com/2026/09/jetpack-consensus-made-generally-fast.html
3•gavide•44m ago•0 comments

White House weighs Defense Production Act to expand US oil refining capacity

https://www.reuters.com/business/energy/white-house-weighs-how-use-defense-production-act-expand-...
4•geox•48m ago•0 comments

A2ABreak: Systematic Security Analysis of the A2A Protocol

https://arxiv.org/abs/2609.10871
2•sbulaev•54m ago•0 comments

Russian developers used Claude to build 'kamikaze' attack drone software

https://www.theguardian.com/world/2026/sep/12/ukraine-war-briefing-russian-developers-used-ai-to-...
6•warrenmiller•58m ago•1 comments

A Nix store is three functions

https://fzakaria.com/2026/09/11/a-nix-store-is-three-functions
3•Tomte•58m ago•0 comments

Hearts of Iron IV, Part I: Operational Art

https://acoup.blog/2026/09/11/teaching-paradox-hearts-of-iron-iv-part-i-operational-art/
2•Tomte•59m ago•0 comments

Show HN: A high-performance, all-in-one extension for managing tabs

https://chromewebstore.google.com/detail/leotabs-—-tab-manager-swi/heolckkdeandgagkiefggcneodni...
4•ringlochid•59m ago•1 comments

Judeo-iraqi Arabic

https://en.wikipedia.org/wiki/Judeo-Iraqi_Arabic
2•marysminefnuf•1h ago•0 comments

Age of Enlightenment

https://en.wikipedia.org/wiki/Age_of_Enlightenment
4•num42•1h ago•0 comments

Planck Scale

https://en.wikipedia.org/wiki/Planck_units
5•num42•1h ago•0 comments

Show HN: Poptimum – A Daily Optimization Game

https://poptimum.fun/
3•ShayHDavidson•1h ago•1 comments

WeWorm: Zero-Click WeChat Worm

https://calif.io/research/weworm
5•BlackEarth•1h ago•0 comments

Show HN: GenieUI – Turn prompts into editable iOS and Android interfaces

https://genieui.com/
2•andygeek•1h ago•0 comments

Trails – Jac Hacks

https://github.com/tirthsuba15/trails-jac-hacks
2•tirthsuba•1h ago•0 comments