frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Disconnect Remote Vehicle Access for Toyotas

https://disconnectaccess.toyota.com/#/drva-landing
2•freeopinion•4m ago•0 comments

Microsoft Lead: "AI Will Never Replace Coders, Here's Why" [video]

https://www.youtube.com/watch?v=CPrePbvbbic
1•oxag3n•4m ago•0 comments

Introduction to My Personal Blog

https://mylightstillshines.wordpress.com/2026/05/05/introduction/
2•jaygirl•11m ago•0 comments

I'm looking for an AI Automation Engineer role or gig

2•Divinz•11m ago•0 comments

CVE-2026-31431: Copy Fail vs. rootless containers

https://www.dragonsreach.it/2026/05/04/cve-2026-31431-copy-fail-rootless-containers/
6•averi•16m ago•0 comments

Making the Marlboro Man

https://quartr.com/insights/edge/making-the-marlboro-man
3•_vaporwave_•27m ago•0 comments

Safari 26.4 Supports WebTransport

https://webkit.org/blog/17862/webkit-features-for-safari-26-4/
4•nazcan•29m ago•1 comments

Fiddler sues Google after AI Overview wrongly claimed he was a sex offender

https://www.theguardian.com/music/2026/may/05/canadian-ashley-macisaac-fiddler-musician-singer-so...
7•prawn•31m ago•2 comments

Pennsylvania Health Insurance independent research report for Q2 May 2026

https://archive.org/details/pa-health-insurance-market-2026-final.docx-1
3•Steaglsz•33m ago•0 comments

Commodity Markets Outlook [pdf]

https://thedocs.worldbank.org/en/doc/f3138644a1e8e2bb631399ae11d6c408-0050012026/original/CMO-Apr...
2•gmays•33m ago•0 comments

Adobe's 'Modern' User Interface Is Just Webpages – Pixel Envy

https://pxlnv.com/linklog/adobe-modern-user-interface/
3•tambourine_man•34m ago•0 comments

Apple Explores Using Intel and Samsung to Build Main Device Chips in the US

https://www.bloomberg.com/news/articles/2026-05-05/apple-explores-using-intel-and-samsung-to-buil...
11•tambourine_man•36m ago•0 comments

A constrained approach to coding agents

https://github.com/brainless/nocodo
4•brainless•43m ago•1 comments

Ask HN: Best Embedding Models?

5•devstein•44m ago•1 comments

Biscuit

https://github.com/yattsu/biscuit
4•unixfg•49m ago•0 comments

An Analysis of the PocketOS Debacle

https://thedailywtf.com/articles/empty-pockets
3•pseudohadamard•51m ago•1 comments

Musk Settles SEC Suit for Underpaying Twitter Investors by $150M for Just $1.5M

https://www.law.com/corpcounsel/2026/05/04/musk-settles-sec-suit-accusing-him-of-underpaying-twit...
6•1vuio0pswjnm7•52m ago•3 comments

The 90-year-old idea behind JEPA models: Canonical Correlation Analysis (CCA)

https://shonczinner.github.io/posts/embedding-prediction/
4•kjshsh123•53m ago•0 comments

Meta, TikTok Recv Personal Data from Health Exchanges Alarming Privacy Experts

https://www.bloomberg.com/features/2026-healthcare-advertising-trackers-privacy/
5•1vuio0pswjnm7•54m ago•0 comments

An LLM agent that runs on any Linux box

https://getclaw.site/#demo
6•kilian-ai•58m ago•0 comments

Continually improving our agent harness

https://cursor.com/blog/continually-improving-agent-harness
3•gmays•59m ago•0 comments

Show HN: A minimalist personal homepage I designed from scratch

https://olzhasshaikenov.com/
3•olzhas23•1h ago•0 comments

Tokens and Dreams

https://charlesleifer.com/blog/tokens-and-dreams/
6•xngbuilds•1h ago•0 comments

AI and the Danger of Cognitive Surrender

https://www.economist.com/business/2026/04/30/ai-and-the-danger-of-cognitive-surrender
6•1vuio0pswjnm7•1h ago•1 comments

Linux, Windows or macOS: Which Operating System to Use in 2026?

https://www.lucasaguiar.xyz/posts/linux-windows-macos-qual-usar-2026/
4•isfttr•1h ago•3 comments

File Approved – File approvals without the back-and-forth

https://fileapproved.com
4•vannventures•1h ago•0 comments

Echon – A Discord alternative built in Tauri/Rust

https://echon-voice.com
3•highest678•1h ago•0 comments

The Art of Operating Systems (2019)

https://denninginstitute.com/pjd/ArtOS2/
5•aragonite•1h ago•0 comments

Amp's GPT 5.5 Model Analysis

https://ampcode.com/models/gpt-5.5
5•goranmoomin•1h ago•0 comments

Pulitzer Prize Winner in International Reporting

https://www.pulitzer.org/winners/dake-kang-garance-burke-byron-tau-aniruddha-ghosal-and-yael-grau...
28•jay_kyburz•1h ago•2 comments