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

Basics of the 8-Pinski.com Demo

https://movq.de/blog/postings/2026-10-08/0/POSTING-en.html
1•dverlaeckt80•1m ago•0 comments

Stages of migration to new Outlook for Windows

https://learn.microsoft.com/en-us/microsoft-365-apps/outlook/get-started/guide-product-availability
1•Topfi•1m ago•0 comments

German ex-spy chief arrested for treason: What we know

https://www.aljazeera.com/news/2026/10/7/german-ex-spy-chief-arrested-for-treason-what-we-know
2•snarky-comments•2m ago•0 comments

How many false alarms does a typosquat detector raise? We measured ours

https://presend.pages.dev/blog/typosquat-false-positives/
1•Presend•2m ago•0 comments

Show HN: Gauze fixes (some) open-weight LLM deficiencies

https://github.com/ggeorgovassilis/llm-gauze
1•ggeorgovassilis•3m ago•0 comments

Show HN: Leafovers "vibe coded" promo video

https://www.youtube.com/watch?v=o8565m3eTok
2•expashaparasha•4m ago•0 comments

Skipping Stones – Git history with the agent conversations behind each commit

https://skipping-stones.dev/
1•YarivAshk•5m ago•0 comments

China is ramping up spy recruitment across the US – and threatening families

https://nypost.com/2026/10/07/us-news/wanying-zhang-is-one-of-a-growing-number-of-chinese-spies-i...
1•snarky-comments•6m ago•0 comments

The Plane of Focus

https://sael.net/plane-of-focus/
1•rbinv•7m ago•0 comments

Show HN: Momenial for Events — White-label ticketing app

https://pentas.id/
1•wiradikusuma•7m ago•0 comments

Dark Patterns Won

https://blog.ronbronson.com/dark-patterns-won
1•speckx•9m ago•0 comments

Neon: How we systematically improved our reliability

https://neon.com/blog/how-we-systematically-improved-our-reliability
1•dotmanish•10m ago•0 comments

All code will converge on Rust

https://mainmatter.com/blog/2026/10/08/all-code-will-converge-on-rust/
1•marcoow•12m ago•0 comments

Allow-List Architecture

https://samueljsb.co.uk/blog/posts/2026/10/allow-list-architecture/
1•meshy•15m ago•0 comments

Solo Developer Rebuilds Adobe Creative Suite in Rust Using Claude

https://www.tomshardware.com/software/video-editing-graphic-design/solo-developer-rebuilds-adobe-...
3•ianbooker•15m ago•0 comments

Show HN: ScreenCI – Tutorial videos as E2E tests, written by your coding agent

https://screenci.com/
3•ollipal•15m ago•0 comments

Extract charts and diagrams as vectors from PDF to SVG

https://misha.brukman.net/blog/2025/11/extract-vectors-from-pdf-to-svg/
2•ankitg12•17m ago•0 comments

Tensorlake is compromised using mini Shai Hulud

https://safedep.io/tensorlake-npm-compromise-mini-shai-hulud/
1•Sudhanshu231020•17m ago•0 comments

Show HN: BerryDB – Open-source macOS database client written in Swift and AppKit

https://github.com/berry-apps/berrydb-desktop
1•berryhubapp•19m ago•0 comments

Show HN: Kahawai – An open source, modular media system

https://kahawai.net/
4•berm_•19m ago•0 comments

It's Probably Time to Start Worrying About the 4G LTE Shutdown Bricking Cars

https://www.thedrive.com/news/its-probably-time-to-start-worrying-about-the-4g-lte-shutdown-brick...
3•speckx•20m ago•0 comments

Mellum2.1 Gets to Work: A Fast Open Model for Coding Agents

https://blog.jetbrains.com/ai/2026/10/mellum2-1-gets-to-work-a-fast-open-model-for-coding-agents/
2•acossta•20m ago•0 comments

Preach+ – AI-assisted sermon prep for preachers (EN/ES)

https://apps.apple.com/us/app/preach/id6806718726
2•kenevester•20m ago•0 comments

How Musk, Thiel, and Altman Misread Science Fiction

https://www.theatlantic.com/books/2026/08/silicon-valley-science-fiction-jill-lepore-book-review/...
2•vrganj•20m ago•1 comments

Show HN: Bot Bowl Bench – Benchmarking LLMs with Blood Bowl

https://botbowlbench.com/
2•crimsoneer•23m ago•0 comments

Neat trick to make big PRs readable: reslicing them into small commits

https://www.i-kh.net/p/neat-trick-to-make-big-prs-readable
2•bucket2015•23m ago•0 comments

Making np.searchsorted up to 25× Faster in NumPy 2.5

https://blog.scientific-python.org/numpy/searchsorted/
2•sebg•24m ago•0 comments

Show HN: Etchv – API for invisible watermarks in images, PDFs and videos

https://etchv.com
4•agurha•26m ago•1 comments

Telnet BBS Guide

https://www.telnetbbsguide.com/
5•kmstout•26m ago•0 comments

Pivot – Real-time analytics on Iceberg, faster than ClickHouse on benchmarks

https://github.com/pivotlake/pivot
3•ntur1337•26m ago•0 comments